diff --git a/.gitattributes b/.gitattributes index 6825630198..287fd7dadd 100644 --- a/.gitattributes +++ b/.gitattributes @@ -18,3 +18,20 @@ research/coordinated-frames-and-entrance-banks/** -text -whitespace # Frozen PR210 package and round-nine evidence retain their audited bytes. research/five-stage-source527-banks/** -text -whitespace research/community-round9-audit/** -text -whitespace + +# Frozen replicated E8 sources and witnesses preserve their committed bytes. +research/e8-r740-replica32/** -text +# Byte-identical PR442 proof packages, including original whitespace. +research/e8-early-reset-kernel/** -text -whitespace +research/e8-early-reset-reuse/** -text -whitespace +research/idle-axis-hosting/** -text -whitespace +research/split-centres-global/** -text -whitespace +# Preserve source pins and the literal evidence diff, including removed whitespace. +research/e8-target-mixing-whole/** -text +research/e8-target-mixing-whole-validation/FINAL-COSMETIC.diff -text -whitespace +# R715 source-pinned words and upstream discovery artifacts retain exact bytes. +research/e8-r715-whole-hosted/** -text +research/e8-r715-whole-hosted/upstream*/** -whitespace +# Unmodified PR484 and PR493 supplier packages retain their upstream bytes. +research/e8-complex-gauge-kernel/** -text -whitespace +research/e8-bit-carrier-skeleton/** -text -whitespace diff --git a/.github/workflows/batched-gaussian-boundary.yml b/.github/workflows/batched-gaussian-boundary.yml new file mode 100644 index 0000000000..c126b6967e --- /dev/null +++ b/.github/workflows/batched-gaussian-boundary.yml @@ -0,0 +1,54 @@ +name: batched-gaussian-boundary +on: + pull_request: + paths: + - 'research/batched-gaussian-boundary/**' + - 'references/semantic-bulk/rad20/code/downstream_banded_inverse.py' + - 'references/semantic-bulk/rad20/code/downstream_blocked_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_phase_inverse.py' + - 'references/semantic-bulk/rad20/code/review_banded_inverse.py' + - 'references/semantic-bulk/rad20/reports/bulk-resampling-tape-transfer.md' + - 'references/semantic-bulk/rad20/reports/downstream-microbox-resampling.md' + - 'references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md' + - 'references/semantic-bulk/rad20/reports/review-bulk-resampling.md' + - 'references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md' + - 'research/e8-r740-replica32/code/engines/outer.py' + - 'research/streamed-chirp-phases/PROOF.md' + - '.github/workflows/batched-gaussian-boundary.yml' + push: + paths: + - 'research/batched-gaussian-boundary/**' + - 'references/semantic-bulk/rad20/code/downstream_banded_inverse.py' + - 'references/semantic-bulk/rad20/code/downstream_blocked_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_phase_inverse.py' + - 'references/semantic-bulk/rad20/code/review_banded_inverse.py' + - 'references/semantic-bulk/rad20/reports/bulk-resampling-tape-transfer.md' + - 'references/semantic-bulk/rad20/reports/downstream-microbox-resampling.md' + - 'references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md' + - 'references/semantic-bulk/rad20/reports/review-bulk-resampling.md' + - 'references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md' + - 'research/e8-r740-replica32/code/engines/outer.py' + - 'research/streamed-chirp-phases/PROOF.md' + - '.github/workflows/batched-gaussian-boundary.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: python -B research/batched-gaussian-boundary/verify.py "$RUNNER_TEMP/batched-boundary-controls" + - run: git diff --exit-code diff --git a/.github/workflows/branchfree-gaussian-inverse.yml b/.github/workflows/branchfree-gaussian-inverse.yml new file mode 100644 index 0000000000..21c97e55bf --- /dev/null +++ b/.github/workflows/branchfree-gaussian-inverse.yml @@ -0,0 +1,50 @@ +name: branchfree-gaussian-inverse +on: + pull_request: + paths: + - 'research/branchfree-gaussian-inverse/**' + - 'references/semantic-bulk/rad20/code/downstream_banded_inverse.py' + - 'references/semantic-bulk/rad20/code/downstream_blocked_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_phase_inverse.py' + - 'references/semantic-bulk/rad20/code/review_banded_inverse.py' + - 'references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md' + - 'references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md' + - 'research/batched-gaussian-boundary/PROOF.md' + - 'research/batched-gaussian-boundary/code/batched.py' + - 'research/batched-gaussian-boundary/code/check.py' + - '.github/workflows/branchfree-gaussian-inverse.yml' + push: + paths: + - 'research/branchfree-gaussian-inverse/**' + - 'references/semantic-bulk/rad20/code/downstream_banded_inverse.py' + - 'references/semantic-bulk/rad20/code/downstream_blocked_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_gaussian.py' + - 'references/semantic-bulk/rad20/code/downstream_phase_inverse.py' + - 'references/semantic-bulk/rad20/code/review_banded_inverse.py' + - 'references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md' + - 'references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md' + - 'research/batched-gaussian-boundary/PROOF.md' + - 'research/batched-gaussian-boundary/code/batched.py' + - 'research/batched-gaussian-boundary/code/check.py' + - '.github/workflows/branchfree-gaussian-inverse.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: python -B research/branchfree-gaussian-inverse/verify.py "$RUNNER_TEMP/branchfree-controls" + - run: git diff --exit-code diff --git a/.github/workflows/complementary-fft-reservoirs.yml b/.github/workflows/complementary-fft-reservoirs.yml new file mode 100644 index 0000000000..5a0e55b683 --- /dev/null +++ b/.github/workflows/complementary-fft-reservoirs.yml @@ -0,0 +1,42 @@ +name: complementary-fft-reservoirs +on: + pull_request: + paths: + - 'research/complementary-fft-reservoirs/**' + - 'research/e8-r715-whole-hosted/EXPECTED.json' + - 'research/e8-r740-replica32/code/engines/outer.py' + - 'notes/compact-control-*.tex' + - 'upstream/build/sections/05-layers.tex' + - 'upstream/build/sections/06-transforms.tex' + - 'references/semantic-bulk/rad20/**' + - '.github/workflows/complementary-fft-reservoirs.yml' + push: + paths: + - 'research/complementary-fft-reservoirs/**' + - 'research/e8-r715-whole-hosted/EXPECTED.json' + - 'research/e8-r740-replica32/code/engines/outer.py' + - 'notes/compact-control-*.tex' + - 'upstream/build/sections/05-layers.tex' + - 'upstream/build/sections/06-transforms.tex' + - 'references/semantic-bulk/rad20/**' + - '.github/workflows/complementary-fft-reservoirs.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: python -B research/complementary-fft-reservoirs/verify.py "$RUNNER_TEMP/complementary-fft-controls" + - run: git diff --exit-code diff --git a/.github/workflows/e8-complex-adapted-kernel.yml b/.github/workflows/e8-complex-adapted-kernel.yml new file mode 100644 index 0000000000..a3c418423c --- /dev/null +++ b/.github/workflows/e8-complex-adapted-kernel.yml @@ -0,0 +1,60 @@ +name: e8-complex-adapted-kernel +on: + pull_request: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/e8-target-mixing-whole/**' + - 'research/e8-complex-adapted-kernel/**' + - 'research/whole-hosted-format-ceiling/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-complex-adapted-kernel.yml' + push: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/e8-target-mixing-whole/**' + - 'research/e8-complex-adapted-kernel/**' + - 'research/whole-hosted-format-ceiling/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-complex-adapted-kernel.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Exact cross-family route obstruction + run: python -B research/cross-family-residual-obstruction/verify.py + - name: Exact scoped architecture ceiling + run: python -B research/whole-hosted-format-ceiling/verify.py + - name: Full parent, local phases and both eleven-stage suppliers + run: E8_REPLAY_PHASES=1 python -B research/e8-complex-adapted-kernel/verify.py "$RUNNER_TEMP/e8-complex-adapted-kernel-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/e8-gauge-moment-hosting.yml b/.github/workflows/e8-gauge-moment-hosting.yml new file mode 100644 index 0000000000..16e5734ef1 --- /dev/null +++ b/.github/workflows/e8-gauge-moment-hosting.yml @@ -0,0 +1,46 @@ +name: e8-gauge-moment-hosting +on: + pull_request: + paths: + - 'research/e8-gauge-moment-hosting/**' + - 'research/e8-complex-gauge-kernel/**' + - 'research/e8-bit-carrier-skeleton/**' + - 'research/idle-axis-hosting/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-kernel/**' + - 'research/e8-early-reset-reuse/**' + - '.github/workflows/e8-gauge-moment-hosting.yml' + push: + paths: + - 'research/e8-gauge-moment-hosting/**' + - 'research/e8-complex-gauge-kernel/**' + - 'research/e8-bit-carrier-skeleton/**' + - 'research/idle-axis-hosting/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-kernel/**' + - 'research/e8-early-reset-reuse/**' + - '.github/workflows/e8-gauge-moment-hosting.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.13', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install numpy sympy + - name: Fresh bit and complex suppliers, packing, and outer certificate + run: python -B research/e8-gauge-moment-hosting/verify.py "$RUNNER_TEMP/e8-gauge-moment-hosting" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/e8-r715-whole-hosted.yml b/.github/workflows/e8-r715-whole-hosted.yml new file mode 100644 index 0000000000..b1bcff0f09 --- /dev/null +++ b/.github/workflows/e8-r715-whole-hosted.yml @@ -0,0 +1,62 @@ +name: e8-r715-whole-hosted +on: + pull_request: + paths: + - 'research/e8-r715-whole-hosted/**' + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/e8-target-mixing-whole/**' + - 'research/e8-complex-adapted-kernel/**' + - 'research/whole-hosted-format-ceiling/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-r715-whole-hosted.yml' + push: + paths: + - 'research/e8-r715-whole-hosted/**' + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/e8-target-mixing-whole/**' + - 'research/e8-complex-adapted-kernel/**' + - 'research/whole-hosted-format-ceiling/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-r715-whole-hosted.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Exact cross-family route obstruction + run: python -B research/cross-family-residual-obstruction/verify.py + - name: Exact scoped architecture ceiling + run: python -B research/whole-hosted-format-ceiling/verify.py + - name: Full paid-complex parent and R715 whole-hosted composition + run: E8_REPLAY_PHASES=1 python -B research/e8-r715-whole-hosted/verify.py "$RUNNER_TEMP/e8-r715-whole-hosted-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/e8-r740-replica32.yml b/.github/workflows/e8-r740-replica32.yml new file mode 100644 index 0000000000..4975bb39f4 --- /dev/null +++ b/.github/workflows/e8-r740-replica32.yml @@ -0,0 +1,34 @@ +name: e8-r740-replica32 +on: + pull_request: + paths: + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-r740-replica32.yml' + push: + paths: + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-r740-replica32.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Full parent reconstruction and kernel verification + run: bash research/e8-r740-replica32/verify.sh "$RUNNER_TEMP/e8-r740-replica32-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/e8-target-mixing-whole.yml b/.github/workflows/e8-target-mixing-whole.yml new file mode 100644 index 0000000000..437cdc4ce8 --- /dev/null +++ b/.github/workflows/e8-target-mixing-whole.yml @@ -0,0 +1,54 @@ +name: e8-target-mixing-whole +on: + pull_request: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/e8-target-mixing-whole/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-target-mixing-whole.yml' + push: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/e8-target-mixing-whole/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/e8-target-mixing-whole.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Exact cross-family route obstruction + run: python -B research/cross-family-residual-obstruction/verify.py + - name: Full parent, local phases and both eleven-stage suppliers + run: E8_REPLAY_PHASES=1 python -B research/e8-target-mixing-whole/verify.py "$RUNNER_TEMP/e8-target-mixing-whole-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/fused-dyadic-halos.yml b/.github/workflows/fused-dyadic-halos.yml new file mode 100644 index 0000000000..808af520b9 --- /dev/null +++ b/.github/workflows/fused-dyadic-halos.yml @@ -0,0 +1,48 @@ +name: fused-dyadic-halos +on: + pull_request: + paths: + - 'research/fused-dyadic-halos/**' + - 'references/semantic-bulk/rad20/reports/bulk-resampling-tape-transfer.md' + - 'references/semantic-bulk/rad20/reports/compact-arbitrary-source-routing.md' + - 'references/semantic-bulk/rad20/reports/downstream-microbox-resampling.md' + - 'references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md' + - 'references/semantic-bulk/rad20/reports/review-arbitrary-routing.md' + - 'references/semantic-bulk/rad20/reports/review-bulk-resampling.md' + - 'references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md' + - 'research/batched-gaussian-boundary/PROOF.md' + - 'upstream/build/sections/07-resampling.tex' + - '.github/workflows/fused-dyadic-halos.yml' + push: + paths: + - 'research/fused-dyadic-halos/**' + - 'references/semantic-bulk/rad20/reports/bulk-resampling-tape-transfer.md' + - 'references/semantic-bulk/rad20/reports/compact-arbitrary-source-routing.md' + - 'references/semantic-bulk/rad20/reports/downstream-microbox-resampling.md' + - 'references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md' + - 'references/semantic-bulk/rad20/reports/review-arbitrary-routing.md' + - 'references/semantic-bulk/rad20/reports/review-bulk-resampling.md' + - 'references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md' + - 'research/batched-gaussian-boundary/PROOF.md' + - 'upstream/build/sections/07-resampling.tex' + - '.github/workflows/fused-dyadic-halos.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: python -B research/fused-dyadic-halos/verify.py "$RUNNER_TEMP/fused-halo-controls" + - run: git diff --exit-code diff --git a/.github/workflows/r740-hosted-eleven.yml b/.github/workflows/r740-hosted-eleven.yml new file mode 100644 index 0000000000..6936cc187d --- /dev/null +++ b/.github/workflows/r740-hosted-eleven.yml @@ -0,0 +1,46 @@ +name: r740-hosted-eleven +on: + pull_request: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/r740-hosted-eleven.yml' + push: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/r740-hosted-eleven.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Full parent reconstruction and hosted verification + run: python -B research/r740-hosted-eleven/verify.py "$RUNNER_TEMP/r740-hosted-eleven-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/r740-hosted-rank149.yml b/.github/workflows/r740-hosted-rank149.yml new file mode 100644 index 0000000000..9902b04897 --- /dev/null +++ b/.github/workflows/r740-hosted-rank149.yml @@ -0,0 +1,52 @@ +name: r740-hosted-rank149 +on: + pull_request: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/r740-hosted-rank149.yml' + push: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/r740-hosted-eleven/**' + - 'research/r740-hosted-rank149/**' + - 'research/cross-family-residual-obstruction/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/r740-hosted-rank149.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Exact cross-family route obstruction + run: python -B research/cross-family-residual-obstruction/verify.py + - name: Full parent, local phases and both eleven-stage suppliers + run: E8_REPLAY_PHASES=1 python -B research/r740-hosted-rank149/verify.py "$RUNNER_TEMP/r740-hosted-rank149-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/r740-idle-hosted-replicas.yml b/.github/workflows/r740-idle-hosted-replicas.yml new file mode 100644 index 0000000000..5c7e732117 --- /dev/null +++ b/.github/workflows/r740-idle-hosted-replicas.yml @@ -0,0 +1,44 @@ +name: r740-idle-hosted-replicas +on: + pull_request: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/r740-idle-hosted-replicas.yml' + push: + paths: + - 'research/r740-idle-hosted-replicas/**' + - 'research/split-centres-global/**' + - 'research/e8-early-reset-reuse/**' + - 'research/e8-early-reset-kernel/**' + - 'research/idle-axis-hosting/**' + - 'research/e8-r740-replica32/**' + - '.github/workflows/r740-idle-hosted-replicas.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: sudo apt-get update && sudo apt-get install -y libboost-dev + - run: python -m pip install -r research/e8-r740-replica32/parent436/requirements.txt + - name: Full parent reconstruction and hosted verification + run: python -B research/r740-idle-hosted-replicas/verify.py "$RUNNER_TEMP/r740-idle-hosted-replicas-full" + - name: Require an unchanged tracked tree + run: git diff --exit-code diff --git a/.github/workflows/streamed-chirp-phases.yml b/.github/workflows/streamed-chirp-phases.yml new file mode 100644 index 0000000000..c954ca0b08 --- /dev/null +++ b/.github/workflows/streamed-chirp-phases.yml @@ -0,0 +1,40 @@ +name: streamed-chirp-phases +on: + pull_request: + paths: + - 'research/streamed-chirp-phases/**' + - 'research/complementary-fft-reservoirs/PROOF.md' + - 'research/e8-r715-whole-hosted/EXPECTED.json' + - 'research/e8-r740-replica32/code/engines/outer.py' + - 'upstream/build/sections/07-resampling.tex' + - 'upstream/build/sections/08-assembly.tex' + - '.github/workflows/streamed-chirp-phases.yml' + push: + paths: + - 'research/streamed-chirp-phases/**' + - 'research/complementary-fft-reservoirs/PROOF.md' + - 'research/e8-r715-whole-hosted/EXPECTED.json' + - 'research/e8-r740-replica32/code/engines/outer.py' + - 'upstream/build/sections/07-resampling.tex' + - 'upstream/build/sections/08-assembly.tex' + - '.github/workflows/streamed-chirp-phases.yml' + workflow_dispatch: +permissions: + contents: read +jobs: + verify: + runs-on: ubuntu-latest + timeout-minutes: 10 + strategy: + fail-fast: false + matrix: + python-version: ['3.11', '3.14'] + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false + - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 + with: + python-version: ${{ matrix.python-version }} + - run: python -B research/streamed-chirp-phases/verify.py "$RUNNER_TEMP/streamed-chirp-controls" + - run: git diff --exit-code diff --git a/certificates/joint-dual-kappa.json b/certificates/joint-dual-kappa.json index b7f7b89bc2..1f35b89221 100644 --- a/certificates/joint-dual-kappa.json +++ b/certificates/joint-dual-kappa.json @@ -842,7 +842,7 @@ "scripts/experiments/pin_joint_dual_sources.py": "4d31cc0e38b7902709ca5f8f714cba109760d2592346dd7f8dc0b900a2d9fe00", "scripts/experiments/verify_joint_dual.py": "7a31bba1e9c0ded32ae285df2ca9bc91ef20c330f6789fdba361876f3c7a1985" }, - "source_manifest_sha256": "4f3c15b82a2d97335d4fe95fb8bcb96bd2a921087da289d9da16c68213a17f17", + "source_manifest_sha256": "698fe862a620e5b80b85fbc6034c9456fa0fa9aea638dbbbcb3f9edd24c0415e", "sources": [ { "files": { diff --git a/certificates/joint-dual-validation.json b/certificates/joint-dual-validation.json index 194861d3c3..61a8d41622 100644 --- a/certificates/joint-dual-validation.json +++ b/certificates/joint-dual-validation.json @@ -226,7 +226,7 @@ } }, "bit_saving": "2382370177/50000000000000", - "certificate_sha256": "9801147b1502cf1e43d5fa39aa37f5291f03b48c30c4dd4f272e0877894a1c24", + "certificate_sha256": "6f684fa7f747073a132e8d0b5652cf12a8afa389f2a16ff6ade8e080d786dd22", "kappa": "4764513337/100000000000000", "margins": 7, "producer_words_regenerated_and_matched": true, diff --git a/research/batched-gaussian-boundary-validation/COMPARISON.json b/research/batched-gaussian-boundary-validation/COMPARISON.json new file mode 100644 index 0000000000..43530e7444 --- /dev/null +++ b/research/batched-gaussian-boundary-validation/COMPARISON.json @@ -0,0 +1,11 @@ +{ + "checks_sha256": "d2d4a55ae3e3c447c690abd5a5534e554daad6d63445c91b8a055a69ef0697f2", + "entire_artifacts_identical": { + "CHECKS.json": true, + "RESULT.json": true + }, + "manifest_sha256": "43dd63180f2f958b1962bff048f0e1f15cb52782f34f5d9b5476c14514d164a0", + "result_sha256": "271b6a79d1f20e353d126a9ca8140a20fbcb209cef500b088a7ec457d2540dda", + "source_count": 12, + "sources_match_parent_git": true +} diff --git a/research/batched-gaussian-boundary-validation/README.md b/research/batched-gaussian-boundary-validation/README.md new file mode 100644 index 0000000000..6982ef781d --- /dev/null +++ b/research/batched-gaussian-boundary-validation/README.md @@ -0,0 +1,29 @@ +# Validation of batched Gaussian boundary controls + +Fresh complete wrappers passed on macOS Python 3.11.15 and 3.14.8 and Linux +Python 3.12.3. Entire CHECKS.json and RESULT.json bytes agree. The package +EXPECTED.json contains the complete checked artifact. All 12 source pins +match parent Git bytes; the package manifest remained unchanged throughout +these final runs. No cached mathematical result was reused. + +The first Linux launch used an incorrect home directory and exited 127 +before finding its script. The second launch reached integrity checking, +which rejected eight AppleDouble `._` metadata sidecars from the macOS tar +archive. No expected file was missing or changed. A separate clean archive +with COPYFILE_DISABLE=1 and --no-xattrs preserved every source byte and the +original manifest. The final fresh unit completed with exit 0. The original +failed source snapshot and both failure logs were preserved. Neither failed +launch executed the mathematical checks. + +Only the final clean run supplies the Linux success receipt. Its service was +research-resume-20261011-batched-boundary-final3, with RuntimeMaxSec=900, +CPUQuota=200%, MemoryMax=8G; terminal state inactive/dead, ExecMainStatus=0. +No active research compute remains after validation. + +The algebraic controls are finite. The all-size bit/tape/analytic transfer +is the conditional written argument in PROOF.md. Complete Schur comparisons +use exact dense local inverse references with the newly rounded boundary +and coupling program. Real Gaussian coefficients act on complex payloads +by applying the same batched program separately to real and imaginary parts; +this incurs constant work and error factors covered by the proof's slack. +GitHub CI is separate and was not claimed passed at draft submission. diff --git a/research/batched-gaussian-boundary-validation/RESULT.json b/research/batched-gaussian-boundary-validation/RESULT.json new file mode 100644 index 0000000000..ae4944040f --- /dev/null +++ b/research/batched-gaussian-boundary-validation/RESULT.json @@ -0,0 +1,18 @@ +{ + "boundary_exponent": "29*(1-r)/32", + "complete_schur_entries": 2952, + "cyclic_systems": 15, + "gaussian_systems": 2, + "inverse_entries": 2781, + "kappa_claim": null, + "layouts": { + "cases": 54, + "checked_inverse": true, + "forward_record_moves": 46080, + "one_field_padding": true, + "padded_records": 18432 + }, + "mutants": 6, + "scalar_exponent_upper": "45/16", + "strassen_entries": 341 +} diff --git a/research/batched-gaussian-boundary-validation/archive-metadata-failure.log b/research/batched-gaussian-boundary-validation/archive-metadata-failure.log new file mode 100644 index 0000000000..f64e921148 --- /dev/null +++ b/research/batched-gaussian-boundary-validation/archive-metadata-failure.log @@ -0,0 +1,9 @@ +Traceback (most recent call last): + File "/home/cfky/offload/resume-20261011-batched-boundary/research/batched-gaussian-boundary/verify.py", line 54, in + main() + File "/home/cfky/offload/resume-20261011-batched-boundary/research/batched-gaussian-boundary/verify.py", line 30, in main + integrity() + File "/home/cfky/offload/resume-20261011-batched-boundary/research/batched-gaussian-boundary/verify.py", line 20, in integrity + assert actual == read(ROOT/'MANIFEST.json') + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AssertionError diff --git a/research/batched-gaussian-boundary-validation/initial-launch-failure.log b/research/batched-gaussian-boundary-validation/initial-launch-failure.log new file mode 100644 index 0000000000..bc5dcf40cf --- /dev/null +++ b/research/batched-gaussian-boundary-validation/initial-launch-failure.log @@ -0,0 +1,4 @@ +Oct 11 23:02:40 spark-38d6 systemd[2095]: Started research-resume-20261011-batched-boundary-final.service - /bin/bash /home/chafreaky/offload/run-batched-boundary-final.sh. +Oct 11 23:02:40 spark-38d6 bash[1808271]: /bin/bash: /home/chafreaky/offload/run-batched-boundary-final.sh: No such file or directory +Oct 11 23:02:40 spark-38d6 systemd[2095]: research-resume-20261011-batched-boundary-final.service: Main process exited, code=exited, status=127/n/a +Oct 11 23:02:40 spark-38d6 systemd[2095]: research-resume-20261011-batched-boundary-final.service: Failed with result 'exit-code'. diff --git a/research/batched-gaussian-boundary-validation/linux312-receipt.json b/research/batched-gaussian-boundary-validation/linux312-receipt.json new file mode 100644 index 0000000000..99f6786afb --- /dev/null +++ b/research/batched-gaussian-boundary-validation/linux312-receipt.json @@ -0,0 +1,8 @@ +{ + "checks_sha256": "d2d4a55ae3e3c447c690abd5a5534e554daad6d63445c91b8a055a69ef0697f2", + "manifest_sha256": "43dd63180f2f958b1962bff048f0e1f15cb52782f34f5d9b5476c14514d164a0", + "python": "3.12.3", + "result_sha256": "271b6a79d1f20e353d126a9ca8140a20fbcb209cef500b088a7ec457d2540dda", + "source_sha256": "5612e6c0e86b399f37f9485285b3e5df34759bf412b063c3cb706e2761928d66", + "status": "PASS_BATCHED_GAUSSIAN_BOUNDARY_CONTROLS" +} diff --git a/research/batched-gaussian-boundary-validation/macos311-receipt.json b/research/batched-gaussian-boundary-validation/macos311-receipt.json new file mode 100644 index 0000000000..9c6ff3c7f3 --- /dev/null +++ b/research/batched-gaussian-boundary-validation/macos311-receipt.json @@ -0,0 +1,8 @@ +{ + "checks_sha256": "d2d4a55ae3e3c447c690abd5a5534e554daad6d63445c91b8a055a69ef0697f2", + "manifest_sha256": "43dd63180f2f958b1962bff048f0e1f15cb52782f34f5d9b5476c14514d164a0", + "python": "3.11.15", + "result_sha256": "271b6a79d1f20e353d126a9ca8140a20fbcb209cef500b088a7ec457d2540dda", + "source_sha256": "5612e6c0e86b399f37f9485285b3e5df34759bf412b063c3cb706e2761928d66", + "status": "PASS_BATCHED_GAUSSIAN_BOUNDARY_CONTROLS" +} diff --git a/research/batched-gaussian-boundary-validation/macos314-receipt.json b/research/batched-gaussian-boundary-validation/macos314-receipt.json new file mode 100644 index 0000000000..3257ea6d03 --- /dev/null +++ b/research/batched-gaussian-boundary-validation/macos314-receipt.json @@ -0,0 +1,8 @@ +{ + "checks_sha256": "d2d4a55ae3e3c447c690abd5a5534e554daad6d63445c91b8a055a69ef0697f2", + "manifest_sha256": "43dd63180f2f958b1962bff048f0e1f15cb52782f34f5d9b5476c14514d164a0", + "python": "3.14.8", + "result_sha256": "271b6a79d1f20e353d126a9ca8140a20fbcb209cef500b088a7ec457d2540dda", + "source_sha256": "5612e6c0e86b399f37f9485285b3e5df34759bf412b063c3cb706e2761928d66", + "status": "PASS_BATCHED_GAUSSIAN_BOUNDARY_CONTROLS" +} diff --git a/research/batched-gaussian-boundary/EXPECTED.json b/research/batched-gaussian-boundary/EXPECTED.json new file mode 100644 index 0000000000..5b74437ff2 --- /dev/null +++ b/research/batched-gaussian-boundary/EXPECTED.json @@ -0,0 +1,446 @@ +{ + "all_size_status": "conditional written transfer; not finite proof", + "boundary_exponent": "29*(1-r)/32", + "complete_schur": [ + { + "boundary_and_couplings": "rounded batched products", + "compared_entries": 600, + "coupling_max_page_entries": 4, + "coupling_pages": 6, + "dimension": 24, + "error_upper": "1/22300745198530623141535718272648361505980416", + "local_inverse": "exact dense reference", + "rhs": 25 + }, + { + "boundary_and_couplings": "rounded batched products", + "compared_entries": 2352, + "coupling_max_page_entries": 16, + "coupling_pages": 6, + "dimension": 48, + "error_upper": "1/22300745198530623141535718272648361505980416", + "local_inverse": "exact dense reference", + "rhs": 49 + } + ], + "cyclic_cases": [ + { + "bandwidth": 2, + "block_width": 2, + "counter": { + "scalar_additions": 864, + "scalar_products": 336, + "tiles": 48 + }, + "dimension": 4, + "entries": 24, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "55/64", + "inverse_norm_upper": "794805724531433595351074760288589479819257/696898287454081973172991196020261297061888", + "name": "signed-4-2-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 6, + "work_bits": 192 + }, + { + "bandwidth": 2, + "block_width": 2, + "counter": { + "scalar_additions": 864, + "scalar_products": 336, + "tiles": 48 + }, + "dimension": 4, + "entries": 24, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-4-2-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 6, + "work_bits": 192 + }, + { + "bandwidth": 3, + "block_width": 4, + "counter": { + "scalar_additions": 6336, + "scalar_products": 1568, + "tiles": 32 + }, + "dimension": 6, + "entries": 48, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "27/32", + "inverse_norm_upper": "6450711353457905328152934382437925024482789/5575186299632655785383929568162090376495104", + "name": "signed-6-3-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 8, + "work_bits": 192 + }, + { + "bandwidth": 3, + "block_width": 4, + "counter": { + "scalar_additions": 6336, + "scalar_products": 1568, + "tiles": 32 + }, + "dimension": 6, + "entries": 48, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-6-3-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 8, + "work_bits": 192 + }, + { + "bandwidth": 4, + "block_width": 4, + "counter": { + "scalar_additions": 10692, + "scalar_products": 2646, + "tiles": 54 + }, + "dimension": 8, + "entries": 80, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "107/128", + "inverse_norm_upper": "13039480311661990594254628420224624014032783/11150372599265311570767859136324180752990208", + "name": "signed-8-4-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 10, + "work_bits": 192 + }, + { + "bandwidth": 4, + "block_width": 4, + "counter": { + "scalar_additions": 9504, + "scalar_products": 2352, + "tiles": 48 + }, + "dimension": 8, + "entries": 80, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-8-4-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 10, + "work_bits": 192 + }, + { + "bandwidth": 1, + "block_width": 1, + "counter": { + "scalar_additions": 0, + "scalar_products": 238, + "tiles": 238 + }, + "dimension": 5, + "entries": 35, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "13/16", + "inverse_norm_upper": "26739213530678328658374083835589753531713789/22300745198530623141535718272648361505980416", + "name": "signed-5-1-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 7, + "work_bits": 192 + }, + { + "bandwidth": 1, + "block_width": 1, + "counter": { + "scalar_additions": 0, + "scalar_products": 252, + "tiles": 252 + }, + "dimension": 5, + "entries": 35, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-5-1-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 7, + "work_bits": 192 + }, + { + "bandwidth": 2, + "block_width": 2, + "counter": { + "scalar_additions": 3888, + "scalar_products": 1512, + "tiles": 216 + }, + "dimension": 9, + "entries": 99, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "13/16", + "inverse_norm_upper": "6686735679935483761620396893841534378243649/5575186299632655785383929568162090376495104", + "name": "signed-9-2-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 11, + "work_bits": 192 + }, + { + "bandwidth": 2, + "block_width": 2, + "counter": { + "scalar_additions": 3672, + "scalar_products": 1428, + "tiles": 204 + }, + "dimension": 9, + "entries": 99, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-9-2-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 11, + "work_bits": 192 + }, + { + "bandwidth": 3, + "block_width": 4, + "counter": { + "scalar_additions": 35640, + "scalar_products": 8820, + "tiles": 180 + }, + "dimension": 17, + "entries": 323, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "13/16", + "inverse_norm_upper": "26670556550019444468006998793812075621215917/22300745198530623141535718272648361505980416", + "name": "signed-17-3-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 19, + "work_bits": 192 + }, + { + "bandwidth": 3, + "block_width": 4, + "counter": { + "scalar_additions": 33660, + "scalar_products": 8330, + "tiles": 170 + }, + "dimension": 17, + "entries": 323, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-17-3-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 19, + "work_bits": 192 + }, + { + "bandwidth": 4, + "block_width": 4, + "counter": { + "scalar_additions": 58212, + "scalar_products": 14406, + "tiles": 294 + }, + "dimension": 24, + "entries": 624, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "13/16", + "inverse_norm_upper": "13318566136563860563490156374233109532666891/11150372599265311570767859136324180752990208", + "name": "signed-24-4-False", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 26, + "work_bits": 192 + }, + { + "bandwidth": 4, + "block_width": 4, + "counter": { + "scalar_additions": 55440, + "scalar_products": 13720, + "tiles": 280 + }, + "dimension": 24, + "entries": 624, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "1/1048576", + "inverse_norm_upper": "1048576", + "name": "signed-24-4-True", + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 26, + "work_bits": 192 + }, + { + "bandwidth": 2, + "block_width": 2, + "counter": { + "scalar_additions": 1944, + "scalar_products": 756, + "tiles": 108 + }, + "dimension": 9, + "entries": 99, + "error_upper": "0", + "gap": "1", + "inverse_norm_upper": "1", + "name": "identity-no-wrap", + "residual_upper": "0", + "rhs": 11, + "work_bits": 192 + } + ], + "exponent_rows": [ + { + "new_boundary_margin": "3000029/32000000", + "old_boundary_margin": "1/1000000", + "r": "1/1000000" + }, + { + "new_boundary_margin": "3029/32000", + "old_boundary_margin": "1/1000", + "r": "1/1000" + }, + { + "new_boundary_margin": "89/640", + "old_boundary_margin": "1/20", + "r": "1/20" + }, + { + "new_boundary_margin": "11/40", + "old_boundary_margin": "1/5", + "r": "1/5" + } + ], + "gaussian_cases": [ + { + "bandwidth": 2, + "block_width": 2, + "counter": { + "scalar_additions": 1584, + "scalar_products": 616, + "tiles": 88 + }, + "dimension": 6, + "entries": 48, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "57895842715242735165908664708337289626473478545052780855143356101095467738617/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "gaussian_values": 12, + "inverse_norm_upper": "22300822968930725943108156204556032787157431/22300745198530623141535718272648361505980416", + "name": "gaussian-24-26-4-1", + "phase_identities": 42, + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 8, + "source_shape": [ + 24, + 26, + 4, + 1 + ], + "work_bits": 256 + }, + { + "bandwidth": 4, + "block_width": 4, + "counter": { + "scalar_additions": 17424, + "scalar_products": 4312, + "tiles": 88 + }, + "dimension": 12, + "entries": 168, + "error_upper": "1/22300745198530623141535718272648361505980416", + "gap": "37579175804599213191522751958741197747966898469331869911828471920624365501035/57896044618658097711785492504343953926634992332820282019728792003956564819968", + "gaussian_values": 23, + "inverse_norm_upper": "3765814800466668115286855601532575640674701/2787593149816327892691964784081045188247552", + "name": "gaussian-48-50-4-2", + "phase_identities": 174, + "residual_upper": "1/22300745198530623141535718272648361505980416", + "rhs": 14, + "source_shape": [ + 48, + 50, + 4, + 2 + ], + "work_bits": 256 + } + ], + "kappa_claim": null, + "layouts": { + "cases": 54, + "checked_inverse": true, + "forward_record_moves": 46080, + "one_field_padding": true, + "padded_records": 18432 + }, + "rejected_mutants": [ + { + "discrepancy_lower": "118268971908279833764521/604462909807314587353088", + "name": "wrong-forward-transfer-sign" + }, + { + "discrepancy_lower": "105595641330521526901791/1208925819614629174706176", + "name": "omit-cyclic-correction" + }, + { + "discrepancy_lower": "45441276083679665102339/302231454903657293676544", + "name": "wrong-border-order" + }, + { + "discrepancy_lower": "55267941253540772310175/604462909807314587353088", + "name": "transpose-diagonal-inverse" + }, + { + "discrepancy_lower": "1453168942326195159045989/604462909807314587353088", + "name": "wrong-rhs-row-order" + }, + { + "discrepancy_lower": "69769915508805762681/1208925819614629174706176", + "name": "insufficient-output-precision" + } + ], + "scalar_exponent_upper": "45/16", + "strassen": [ + { + "entries": 1, + "n": 1, + "scalar_additions": 0, + "scalar_products": 1, + "tiles": 0 + }, + { + "entries": 4, + "n": 2, + "scalar_additions": 18, + "scalar_products": 7, + "tiles": 0 + }, + { + "entries": 16, + "n": 4, + "scalar_additions": 198, + "scalar_products": 49, + "tiles": 0 + }, + { + "entries": 64, + "n": 8, + "scalar_additions": 1674, + "scalar_products": 343, + "tiles": 0 + }, + { + "entries": 256, + "n": 16, + "scalar_additions": 12870, + "scalar_products": 2401, + "tiles": 0 + } + ] +} diff --git a/research/batched-gaussian-boundary/MANIFEST.json b/research/batched-gaussian-boundary/MANIFEST.json new file mode 100644 index 0000000000..3d533fc4cf --- /dev/null +++ b/research/batched-gaussian-boundary/MANIFEST.json @@ -0,0 +1,9 @@ +{ + "EXPECTED.json": "d2d4a55ae3e3c447c690abd5a5534e554daad6d63445c91b8a055a69ef0697f2", + "PROOF.md": "d147cdd503e3b1830779d6810f0314b071de9cb6c5e15cfb42d80dff1079d435", + "README.md": "21c672cb447025bfe2e0563d727d441aa85519bc98bdab116db5673bc4ad4fa9", + "SOURCE.json": "5612e6c0e86b399f37f9485285b3e5df34759bf412b063c3cb706e2761928d66", + "code/batched.py": "a935d3e3ace1719a8bf1665445fade2e3b0c1d58bf07a1cb42c50dc4dfedae33", + "code/check.py": "661b7d194447339f7af420f017b008fa4717470f38c50a0da99db19e962a931d", + "verify.py": "5497b19c0443ed29d3331c510d16ffb8969c430b3b44c9a0eb423eb50dd4ebe3" +} diff --git a/research/batched-gaussian-boundary/PROOF.md b/research/batched-gaussian-boundary/PROOF.md new file mode 100644 index 0000000000..1bac84f3d9 --- /dev/null +++ b/research/batched-gaussian-boundary/PROOF.md @@ -0,0 +1,297 @@ +# Batched boundary inverses for the retained Gaussian phase cells + +This is a conditional refinement of one Gaussian cost row. It retains the +phase-cell matrix, interior Gohberg–Semencul maps, normalizations, prime +intervals, error interface, microbox construction and arbitrary-source router. +Those all-size interfaces remain assumptions. It does not prove a complete +integer-multiplication theorem or a new kappa. Finite checks below test the +new block program and its interface; they do not prove the tape transfer. + +The source reports and implementations are pinned in SOURCE.json. The +seven-product square multiplication is Strassen's established algorithm, +not a new identity: V. Strassen, *Gaussian elimination is not optimal*, +Numerische Mathematik 13 (1969), 354–356, DOI 10.1007/BF02165411. +The [primary paper](https://courses.grainger.illinois.edu/cs357/su2013/Honors/Strassen.pdf) +was inspected on 2026-10-11. The contribution here is its application across +right-hand sides of the retained boundary inverse, with rounded-block +residual bounds and a paid small-field layout. + +## 1. Scope and resulting row + +Use p>100, d=Theta(p^epsilon), u=Theta(p^r), +w=ceil(sqrt(16p/u))+2, and the eventual cutoffs in the phase-cell report. +In particular u*d<=p, d>4w+2, 0=p^8. All constants may +depend on the fixed positive delta. This includes expansion, compression, +couplings, table traffic, grouping, cropping, and returns. It replaces only +the inverse-boundary terms of the pinned bulk row. + +For an entirely rational exponent allowance, 7^16<2^45, so omega<45/16. +The boundary exponent is at most 29(1-r)/32+delta, giving margin + +``` +new_boundary = (3+29r)/32 - delta +old_boundary = r - delta +new_boundary-old_boundary = 3(1-r)/32 > 0. +``` + +The Gaussian local margin 1-epsilon-delta, gamma_sublinear condition +epsilon+r<1, small_field_exposure, balanced-prefix cost, compact FFT and +supplier conditions remain. In particular the current assembly has +1-epsilon-delta>minimum and r-delta>minimum; raising only the latter +cannot raise that assembly's selected minimum. No kappa gain is claimed. + +## 2. Block the existing triangular factors + +The source Schur matrix S on m=O(s*w/d) boundary vertices is circular-banded +with scalar half bandwidth v<=2w. For principal microboxes the count is +m=O(L*w/d+w), with the inherited endpoint treatment. Setup rounds S to the +P-grid, P=32768p, retaining positive diagonal, row gap >=1/(16p), and row +norm <2. Write the rounded matrix as A+U_border V, where A omits wrap +entries. The original Woodbury setup supplies + +``` +A=L_tri U_tri, +Z=A^-1 U_border, +K=I+VZ, +S^-1 B = X-Z K^-1 V X, X=A^-1 B. +``` + +These symbols distinguish triangular factors from the microbox length L +and border injection. The inherited bounds are + +``` +||L_tri|| <=65p^2, ||L_tri^-1|| <32p, +||U_tri|| <2, ||U_tri^-1|| <=1040p^3, +||A^-1|| <=16p, ||V|| <2, ||Z|| <=16p, ||K^-1|| <=33p. +``` + +Choose h=2^ceil(log_2(max(1,v))), so v<=h<2v<=4w<=4p eventually. +Partition each triangular factor into contiguous h-row blocks, retaining +a shorter last block. A scalar-band-v triangular matrix is block +bidiagonal. For a lower factor its equations are + +``` +D_i Y_i + E_i Y_(i-1) = B_i, +C_i=D_i^-1, F_i=-C_i E_i, +Y_i=C_i B_i+F_i Y_(i-1). +``` + +The upper solve uses the next block and the reverse order. All C_i and +F_i are computed exactly in setup, then rounded entrywise toward zero to +P fractional bits. There is no online inversion. The diagonal block of a +triangular inverse equals the inverse of its diagonal block; therefore +||C_i|| is bounded by the corresponding full triangular inverse norm. +Also ||F_i||<=||C_i||*||E_i||. All stored coefficients have polynomial +magnitude and O(p) bits. + +Process h independent right-hand sides together. Zero-pad a final short +row block and, if needed, the final short RHS batch for matrix products; +discard only those known padding coordinates. A block update uses two +h-square products and additions, costing O(h^omega p^(1+delta)) bits. +There are O(m/h) updates in each of two triangular solves. Thus the cost +per batch is O(m h^(omega-1) p^(1+delta)), and amortized per real line is +O(m h^(omega-2) p^(1+delta)). Section 5 supplies full batches with at most +constant padding overhead; this is not a speedup asserted for one RHS. + +## 3. Exact multiplication followed by one rounding + +Use the ordinary seven-product Strassen recurrence over signed dyadics. +No rounding occurs inside its recursive products or additions. Coefficients +and RHS entries have P fractional bits and polynomial integer magnitudes. +Each leaf input is a signed sum of at most h original values; intermediate +products and recombinations have at most polynomial-in-h amplification. +Consequently all working numerators have O(P+log h+log p)=O(p) bits and +at most 2P fractional bits. Round each completed block-update entry once. +For a completed rectangular Woodbury product, accumulate its constant +number of square tiles exactly before rounding once per output entry. + +The scalar multiplication count at h=2^k is exactly 7^k; additions are +6(7^k-h^2). This identity and every tested product are checked against an +independent cubic matrix multiplication. The established unconditional +short integer multiplier, also used by the source's local convolutions, +gives the stated bit cost. This use does not assume the multiplication +improvement being researched. + +For a fixed-tape realization, store the depth-first recursion stack and its +bounded number of pending operand/result arrays on a fixed set of tapes. +At a node, split, add, copy, reset and recombine sequentially in O(h^2 p) +bit movement. The seven children are visited in fixed order; pending +arrays are passed over or copied at their charged node volume. The work +recurrence is 7T(h/2)+O(h^2 p), besides leaf multiplication. Its sum is +O(h^omega p^(1+delta)); the logarithmic-depth control records and rewinds +are included (or absorbed in delta). A separate tape per recursion level +or random access to stored submatrices is not required. + +## 4. Rounding bound independent of the number of blocks + +All matrix norms in this section are row-sum norms. For an RHS batch use +the maximum absolute entry; multiplication by a coefficient matrix is +bounded by its row-sum norm, independently of the number of RHS columns. +Put eta=2^-P and M=2^16 p^4. M exceeds every exact triangular norm, +inverse norm, diagonal inverse and transfer-block norm above, as well as +the Woodbury norms. Each h-wide rounded coefficient row changes by at +most h*eta<=4p*eta. + +Let T denote one exact triangular factor, B_0=max(1,||B||_max), and Y the +computed block solution. Multiply its block recurrence by the *exact* +D_i. Since D_i C_i=I and D_i F_i+E_i=0, its original-system residual is + +``` +||T Y-B||_max <= 4p M eta (B_0+||Y||_max+1). +``` + +This is a maximum over block rows, not a sum over the line. The factor +inverse bound and 8p M^2 eta<1/2 imply ||Y||_max<=3M B_0. Hence + +``` +||Y-T^-1 B||_max <=32p M^3 eta B_0. +``` + +Composing forward and backward solves gives +||computed_X-A^-1 B||_max<=128p M^4 eta B_0 and +||computed_X||_max<=9M^2 B_0. These generous constants are uniform in m. + +The wrap rank is at most 2v<=4w. V has support only on the first and last +v original boundary coordinates: do not scan a dense m-wide V for each +row. Gather those two known groups in ordered passes. Compute VX, K^-1VX, +and ZK^-1VX by h-square tiling, with at most two tiles across each short +dimension and O(m/h) row tiles for Z. Ragged physical endpoints remain +the original endpoints, not the end of a fictitious padded matrix. +Coefficient row perturbations are at most 4p eta for these three maps. +Combining their polynomial norms with the triangular error gives the +deliberately loose uniform bound + +``` +||computed_S_inverse(B)-S^-1 B||_max + < 2^200 p^40 eta B_0. +``` + +For example the propagated triangular contribution is at most +256p M^7 eta B_0. Each additional rounded map has error bounded by its +row perturbation times the preceding magnitude, plus eta; three such +terms and the final subtraction are below 2^12 p M^7 eta B_0, which is +2^124 p^29 eta B_0 <2^200 p^40 eta B_0. Including the source's S-rounding +perturbation of 640p^3 eta fits this allowance as well. + +Both original coupling matrices have only O(w^2) nonzeros per cell. Each +connects that cell's two boundary groups to O(w) nearby interior indices, +and never to another cell's interior. Compile these small rectangular +pages in setup; apply each to the same h RHS using padded square products. +Coefficient rounding and once-per-output rounding have the same errors as +the original exact dot products: the multiplication algorithm changes +neither their rounded coefficients nor their exact products. + +Use the pinned GS interior error LA=2^(32p)*p^8*eta and the new allowance +SB=2^200*p^40*eta. The source's fixed-depth Schur composition is bounded by + +``` +1024p^2 LA +512p^2 SB +2048p^4 eta + <2^(64p)*p^64*eta, p>100. +``` + +The remaining H-to-N perturbation, normalization and disk rounding are +unchanged. Thus P=32768p still gives the original scalar accuracy and +tensor error interface. This proof retains u*d<=p; batching does not +reduce the phase-cell similarity exponent F_j or allow less precision. + +## 5. Pay for RHS grouping, pages and returns + +Use the source's bulk microbox layout, already obtained by its constant +number of large router calls. Its local fields have length L or L+2A, +where A=4096p^3 and L>=p^8; intermediate completed core fields are padded +back to L. The coarse labels remain in their existing order. A fixed +coarse tuple and axis i determine one scalar operator page, independent +of all the other local coordinates. Therefore other local coordinates +are legitimate independent RHS, including when their values are dirty +intermediate data. No equality or duplication of their values is used. + +Eventually D=d-1>=2. Choose one other local axis. Pad only THAT field to +its next power of two, less than twice its current length. Since its +length is >=L and h<=4p, its dyadic size is divisible by h and at least h. +Use its low log_2(h) bits as the RHS batch coordinate. All other coordinates +index batches. The page and coarse index i are the same for all h lines +in one batch. Remove this single-field padding after the axis, before +choosing the next axis; it never accumulates as a 2^D volume factor. + +Expose the current local axis next to the h RHS coordinate, with layout +[other batch coordinates][axis row][RHS]. Moving only polynomial-length +local fields by the retained stable binary split/interleave routine costs +O(log p) times their complete record volume, independent of the length +of any spectator prefix/suffix crossed. It is applied separately within +each unchanged coarse fiber. All records have O(p) bits. Return by the +reverse moves with the correct current field lengths, charging both +directions. The finite layout tests execute stable splits and their +inverse chunk merges, including zeros, tails and non-power-of-two source +fields; they are not a simulation of all tensor routing. + +For each batch, stream phase cells in order, retaining its h RHS original +data, first local inverses and boundary RHS. The unchanged local GS work +can be performed line by line inside that batch using additional short +field transposes. Their cost and returns are O(L*h*p*polylog p), absorbed +by the d local term. Coupling pages are in cell order. The forward and +backward boundary passes retain only the neighboring h-by-h solution +block on work tapes; storing the entire intermediate boundary stream +and reversing its direction costs its bit volume. Gather wrap endpoints +with ordered scans, and stream Z row blocks for the final correction. +Merge boundary and interior outputs in their inherited order. + +Factor pages contain O((L+L*w^2/d+w^2)*p) bits, as before. They are scanned +and reset once per RHS batch, not once per scalar line for the boundary +tables. Their boundary traffic amortizes to O((L*w/d+w)*p) per line, +below the new O((L*w^(omega-1)/d+w^(omega-1))*p^(1+delta)) arithmetic, +since omega>2. Local GS pages may still be scanned once per line and +cost O(Lp), already charged. The source's outer coarse-page catalogue +scans and polynomial setup are retained and absorbed by complete local +microbox volume; there is no random page lookup or new coarse permutation. + +An m-row boundary solve costs O(m*h^(omega-2)*p^(1+delta)) per line; +the two coupling passes cost O((L/d+1)*h^(omega-1)*p^(1+delta)). Since +m=O(L*w/d+w) and h=Theta(w), both are within + +``` +O((L*w^(omega-1)/d+w^(omega-1))*p^(1+delta)) per line. +``` + +Adding the original O(L*p^(1+delta)) local work, summing the O(T/L) +lines per axis and d axes, and adding the grouping and source routing +costs yields Section 1. Online records and recursive work use a fixed +number of tapes. Exact rational block inverses and their possibly long +determinants are setup only: polynomial work in the source axis size and +p remains n^o(1), just as for the existing Schur construction. + +## 6. Evidence and remaining obligations + +The executable producer uses the seven-product recurrence, rounded +diagonal inverses and transfer blocks, two blocked triangular solves, +the actual supported V contraction, and tiled K/Z products. The independent +reference uses dense rational Gauss–Jordan inversion and cubic products. +Tests include ragged blocks, equality at the minimum cyclic dimension, +empty wrap support, signed coefficients, near-singular wrapped pairs, +and actual Gaussian phase-cell Schur matrices. Complete Schur comparisons +use the new rounded boundary/coupling program with an **exact dense local +inverse reference**. They do not rerun the inherited GS rounding proof. + +Mutation controls deliberately change a transfer sign, remove Woodbury, +permute border rows, transpose a diagonal inverse, and permute RHS rows. +The package records their nonzero discrepancies, exact arithmetic counts, +and source hashes. Full outputs must agree across the stated interpreters. + +Weakest steps remain the written all-size fixed-tape and bulk-layout +transfer, inherited analytic Gaussian and normalized-map interfaces, +and the general assembly/compiler contracts. No Lean proof, numerical +runtime speedup, optimality, or new integer-multiplication exponent is +claimed. This row refinement must not be promoted by simply deleting +unrelated assembly guards. diff --git a/research/batched-gaussian-boundary/README.md b/research/batched-gaussian-boundary/README.md new file mode 100644 index 0000000000..fd5b9f5587 --- /dev/null +++ b/research/batched-gaussian-boundary/README.md @@ -0,0 +1,41 @@ +# Batched Gaussian boundary solves + +The retained phase-cell inverse solves the same banded boundary system for +many independent tensor lines. Grouping h right-hand sides, with h a power +of two comparable to the boundary width w, turns the two triangular solves, +Woodbury correction and local couplings into short square matrix products. +Exact Strassen products, rounded only at completed output boundaries, give +a conditional boundary factor `w^(log_2(7)-1)` in place of `w^2`. + +With the exact inequality `7^16 < 2^45`, the Gaussian boundary margin can +be conservatively raised from `r-delta` to `(3+29r)/32-delta`. The precision +remains O(p), including a residual bound independent of the number of cells. +The [proof](PROOF.md) pays for batch grouping, sparse coupling pages, table +scans, cyclic endpoints, zero padding and returns on fixed tapes. + +**No new kappa is claimed.** Per-axis Gaussian work, small-field exposure, +normalization and all supplier/assembly obligations remain. The current +selected minimum is unchanged when only this boundary row is raised. + +Run with Python 3.11+ and the standard library: + +```sh +python -B research/batched-gaussian-boundary/verify.py /absolute/new/output +``` + +The finite checks execute the new blocked program and compare it with +independent dense rational inverses. They cover signed cyclic systems, +near-singular wrapped pairs, ragged blocks, minimum cyclic dimensions, +empty wrap support, Gaussian-derived Schur systems, exact multiplication +counts, stable split/interleave layouts and six deliberately broken solves. +Complete Schur comparisons use the new rounded boundary and coupling maps +with an exact dense local inverse reference; they do not execute a full +Gaussian or multiplication tape machine. The all-size claim remains the +written conditional transfer, not an inference from finite tests or timings. + +SOURCE.json pins all imported implementation files and the source reports. +The phase-cell, Schur and bulk microbox construction is inherited from the +RaD/hipotures reports retained in `references/semantic-bulk/rad20/`, with the +underlying Gaussian interfaces credited there. The seven-product identity +is Strassen's. New batching, accounting, proof and controls by chafreaky +with OpenAI Codex assistance. Apache-2.0. diff --git a/research/batched-gaussian-boundary/SOURCE.json b/research/batched-gaussian-boundary/SOURCE.json new file mode 100644 index 0000000000..e89e903734 --- /dev/null +++ b/research/batched-gaussian-boundary/SOURCE.json @@ -0,0 +1,26 @@ +{ + "commit": "40dd01058439cdffae3e3b41c4fe52edaccf5f91", + "files": { + "references/semantic-bulk/rad20/code/downstream_banded_inverse.py": "024770e7ba33a3739f9d5aa474687109a35e1488c3ad6486656615911ab4cbb0", + "references/semantic-bulk/rad20/code/downstream_blocked_gaussian.py": "2ca6a460a7a9718eaf50f96c1602a1f21c65e2254acb58d3a1693c7e38f1ef95", + "references/semantic-bulk/rad20/code/downstream_gaussian.py": "c666f8ccced2e25db53fc5c0332b86a544b7b84313d0b588588dd19541f1a32a", + "references/semantic-bulk/rad20/code/downstream_phase_inverse.py": "423a67c300b7c93051e0c86edfc6e1c26d342854d06571f8975bfb64181e4f6d", + "references/semantic-bulk/rad20/code/review_banded_inverse.py": "3e91715a1f185efcc5428798779064e0bf2ef892b57e7998afabed1820cd7dca", + "references/semantic-bulk/rad20/reports/bulk-resampling-tape-transfer.md": "cda26d5aca04b9c824eb6c4f50bee564fb7fa908b09a72e76852df5e0b9d2622", + "references/semantic-bulk/rad20/reports/downstream-microbox-resampling.md": "9598c236eed7e44ac5eb41cc20f7c23249829e195247d15e2857a34e14222c49", + "references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md": "3cdf492bcb719db4295658604dc202d6a2c5a008b87de43ec54f0107c64db730", + "references/semantic-bulk/rad20/reports/review-bulk-resampling.md": "12aefaa9a0eee367fb71e8f910ed5f0094e1203d2caa29836b0c37887c446c29", + "references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md": "113927dd4fb77a55a457bd5f6da8cbfc7262d0fbc4e9d708b591a1d632e6caf6", + "research/e8-r740-replica32/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "research/streamed-chirp-phases/PROOF.md": "0c4438e09ec34ec8208dff90851fbc05bee0cbbefcac4d90208cfc63facc0207" + }, + "literature": [ + { + "author": "Volker Strassen", + "doi": "10.1007/BF02165411", + "title": "Gaussian elimination is not optimal", + "url": "https://courses.grainger.illinois.edu/cs357/su2013/Honors/Strassen.pdf", + "year": 1969 + } + ] +} diff --git a/research/batched-gaussian-boundary/code/batched.py b/research/batched-gaussian-boundary/code/batched.py new file mode 100644 index 0000000000..395470320e --- /dev/null +++ b/research/batched-gaussian-boundary/code/batched.py @@ -0,0 +1,188 @@ +"""Rounded block-bidiagonal and cyclic solves with exact Strassen products. + +Finite prototype, not a tape-machine implementation. Offline rational tables +are rounded once. Each online matrix product is exact until its output grid. +""" +from fractions import Fraction as Q + + +def zeros(n, m): + return [[Q(0) for _ in range(m)] for _ in range(n)] + + +def add(a, b, sign=1): + return [[x+sign*y for x, y in zip(ar, br)] for ar, br in zip(a, b)] + + +def rounded(x, bits): + if bits is None: + return x + scale = 1 << bits + k = abs(x.numerator*scale)//x.denominator + return Q(k if x >= 0 else -k, scale) + + +def grid(a, bits): + return [[rounded(x, bits) for x in row] for row in a] + + +def strassen(a, b, count): + n = len(a) + assert n and n & (n-1) == 0 + assert all(len(row) == n for row in a+b) and len(b) == n + if n == 1: + count['scalar_products'] += 1 + return [[a[0][0]*b[0][0]]] + h = n//2 + def split(x): + return ([r[:h] for r in x[:h]], [r[h:] for r in x[:h]], + [r[:h] for r in x[h:]], [r[h:] for r in x[h:]]) + a11, a12, a21, a22 = split(a) + b11, b12, b21, b22 = split(b) + mul = lambda x, y: strassen(x, y, count) + p1 = mul(add(a11, a22), add(b11, b22)) + p2 = mul(add(a21, a22), b11) + p3 = mul(a11, add(b12, b22, -1)) + p4 = mul(a22, add(b21, b11, -1)) + p5 = mul(add(a11, a12), b22) + p6 = mul(add(a21, a11, -1), add(b11, b12)) + p7 = mul(add(a12, a22, -1), add(b21, b22)) + c11 = add(add(add(p1, p4), p5, -1), p7) + c12 = add(p3, p5) + c21 = add(p2, p4) + c22 = add(add(add(p1, p3), p2, -1), p6) + count['scalar_additions'] += 18*h*h + return [x+y for x, y in zip(c11, c12)]+[x+y for x, y in zip(c21, c22)] + + +def product(a, b, h, count, bits=None): + """Rectangular tiling by h-square products; exact accumulation then grid.""" + n, k, m = len(a), len(b), len(b[0]) + assert n and k and m and all(len(row) == k for row in a) + assert all(len(row) == m for row in b) + out = zeros(n, m) + for i in range(0, n, h): + for j in range(0, m, h): + block = zeros(h, h) + for t in range(0, k, h): + aa, bb = zeros(h, h), zeros(h, h) + for x in range(min(h, n-i)): + for y in range(min(h, k-t)): + aa[x][y] = a[i+x][t+y] + for x in range(min(h, k-t)): + for y in range(min(h, m-j)): + bb[x][y] = b[t+x][j+y] + block = add(block, strassen(aa, bb, count)) + count['tiles'] += 1 + for x in range(min(h, n-i)): + for y in range(min(h, m-j)): + out[i+x][j+y] = rounded(block[x][y], bits) + return out + + +def prepare_triangle(t, h, upper, inverse, bits): + """Only diagonal/adjacent blocks are allowed; inversions are offline.""" + n = len(t) + assert all(len(row) == n for row in t) + blocks = [] + for i in range(0, n, h): + end = min(i+h, n) + prev = i+h if upper else i-h + near = list(range(max(0, prev), min(n, prev+h))) if 0 <= prev < n else [] + for row in range(i, end): + assert all(t[row][col] == 0 for col in range(n) + if not i <= col < end and col not in near) + diag = [row[i:end] for row in t[i:end]] + c = inverse(diag) + # This polynomial-time product is setup, never online work. + a = [[-sum((c[x][j]*t[i+j][y] for j in range(end-i)), Q(0)) + for y in near] for x in range(end-i)] + blocks.append(dict(start=i, end=end, near=near, c=grid(c, bits), a=grid(a, bits))) + return dict(blocks=blocks, upper=upper, h=h, bits=bits, n=n) + + +def triangle(table, b, count): + assert len(b) == table['n'] + h, bits = table['h'], table['bits'] + out = zeros(len(b), len(b[0])) + seq = reversed(table['blocks']) if table['upper'] else table['blocks'] + for block in seq: + i, end = block['start'], block['end'] + y = product(block['c'], b[i:end], h, count) + if block['near']: + y = add(y, product(block['a'], [out[j] for j in block['near']], h, count)) + out[i:end] = grid(y, bits) + return out + + +def prepare(s, bandwidth, bits): + from downstream_banded_inverse import lu_banded, inverse_exact, solve_exact + n = len(s) + assert n >= 2*bandwidth + assert all(s[i][j] == 0 for i in range(n) for j in range(n) + if min(abs(i-j), n-abs(i-j)) > bandwidth) + a = [[x if abs(i-j) <= bandwidth else Q(0) for j, x in enumerate(row)] + for i, row in enumerate(s)] + low, high, metadata = lu_banded(a, bandwidth) + h = 1 << (bandwidth-1).bit_length() + border = list(range(bandwidth))+list(range(n-bandwidth, n)) + v = [[s[i][j]-a[i][j] for j in range(n)] for i in border] + support = [j for j in range(n) if any(row[j] for row in v)] + assert len(support) <= 2*bandwidth + columns = [solve_exact(low, high, [Q(i == j) for i in range(n)], bandwidth) + for j in border] + z = list(map(list, zip(*columns))) + k = [[Q(i == j)+sum((v[i][l]*z[l][j] for l in support), Q(0)) + for j in range(len(border))] for i in range(len(border))] + ki = inverse_exact(k) + return dict(low=prepare_triangle(low, h, False, inverse_exact, bits), + high=prepare_triangle(high, h, True, inverse_exact, bits), + v=grid([[row[j] for j in support] for row in v], bits), + support=support, z=grid(z, bits), ki=grid(ki, bits), + h=h, bits=bits, metadata=metadata) + + +def solve(table, b, count): + h, bits = table['h'], table['bits'] + y = triangle(table['low'], b, count) + x = triangle(table['high'], y, count) + if not table['support']: + return x + vb = product(table['v'], [x[j] for j in table['support']], h, count, bits) + c = product(table['ki'], vb, h, count, bits) + correction = product(table['z'], c, h, count, bits) + return grid(add(x, correction, -1), bits) + + +def counter(): + return dict(scalar_products=0, scalar_additions=0, tiles=0) + + +def compile_coupling(a, row_groups, col_groups, h, bits): + """Offline cell-local sparse pages; reject an edge outside its named cell.""" + assert len(row_groups) == len(col_groups) + pages, covered = [], set() + for rows, cols in zip(row_groups, col_groups): + rr = [i for i in rows if any(a[i][j] for j in cols)] + cc = [j for j in cols if any(a[i][j] for i in rows)] + assert len(rr) <= h and len(cc) <= h + for i in rows: + for j in cols: + if a[i][j]: + assert (i, j) not in covered + covered.add((i, j)) + if rr and cc: + pages.append(dict(rows=rr, cols=cc, values=grid([[a[i][j] for j in cc] for i in rr], bits))) + assert covered == {(i, j) for i, row in enumerate(a) for j, x in enumerate(row) if x} + assert len({i for page in pages for i in page['rows']}) == sum(len(p['rows']) for p in pages) + return dict(pages=pages, n=len(a), h=h, bits=bits) + + +def coupling(table, b, count): + out = zeros(table['n'], len(b[0])) + for page in table['pages']: + values = product(page['values'], [b[j] for j in page['cols']], + table['h'], count, table['bits']) + for i, row in zip(page['rows'], values): + out[i] = row + return out diff --git a/research/batched-gaussian-boundary/code/check.py b/research/batched-gaussian-boundary/code/check.py new file mode 100644 index 0000000000..3e483981b7 --- /dev/null +++ b/research/batched-gaussian-boundary/code/check.py @@ -0,0 +1,286 @@ +"""Independent dense residuals, genuine Gaussian Schur cases and layout controls.""" +from copy import deepcopy +from fractions import Fraction as Q +from itertools import product as cartesian +from pathlib import Path +import sys + +from batched import compile_coupling, coupling, counter, grid, prepare, product, solve, strassen + +REPO = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(REPO/'references/semantic-bulk/rad20/code')) +from review_banded_inverse import inverse, multiply, norm + + +def max_entry(a): + return max((abs(x) for row in a for x in row), default=Q(0)) + + +def sub(a, b): + return [[x-y for x, y in zip(ar, br)] for ar, br in zip(a, b)] + + +def outward(x, bits=144): + return str(Q(-(-(x*(1 << bits)).numerator//(x*(1 << bits)).denominator), 1 << bits)) + + +def gap(a): + return min(row[i]-sum((abs(x) for j, x in enumerate(row) if j != i), Q(0)) + for i, row in enumerate(a)) + + +def signed_case(n, width, near=False): + a = [[Q(i == j) for j in range(n)] for i in range(n)] + for i in range(n): + for d in range(1, width+1): + for sign in (-1, 1): + j = (i+sign*d) % n + a[i][j] = Q(((i*13+j*7)%7)-3, 32*width) + if near: + # Disjoint nearly singular wrapped pairs attain a large inverse norm. + a = [[Q(i == j) for j in range(n)] for i in range(n)] + pairs = [(0, n-1)]+[(i, i+1) for i in range(1, n-2, 2)] + for i, j in pairs: + a[i][j] = a[j][i] = 1-Q(1, 1 << 20) + assert gap(a) > 0 and norm(a) < 2 + return a + + +def gaussian_schur(s, t, u, w, bits): + """Reconstruct the pinned rounded H, then independently eliminate interiors.""" + from downstream_banded_inverse import nearest_data, phi + from downstream_blocked_gaussian import gaussian_interval, pi_interval + from downstream_phase_inverse import cells_for + rho, beta = nearest_data(s, t) + cells = cells_for(s, t) + assert all(len(c) > 2*w for c in cells) + pi = pi_interval(bits+64) + cache = {} + def lower(f): + if f not in cache: + lo, hi = gaussian_interval(f, pi, bits+24) + assert hi-lo < Q(1, 1 << bits) + value = lo*(1 << bits) + cache[f] = Q(value.numerator//value.denominator, 1 << bits) + return cache[f] + fs = [u*(Q(1, 4)-x*x)/(rho-1) for x in beta] + weights = [lower(f) for f in fs] + assert min(weights) > 0 + kernel = [Q(1)]+[lower(u*rho*j*j) for j in range(1, w+1)] + owner = {j: i for i, cell in enumerate(cells) for j in cell} + a = [[Q(i == j) for j in range(s)] for i in range(s)] + identities = 0 + for i in range(s): + for d in range(-w, w+1): + if not d: + continue + j = (i+d) % s + f = u*phi(rho, beta, i, d) + if owner[i] == owner[j] and abs(i-j) <= w: + assert f == u*rho*d*d+fs[i]-fs[j] + a[i][j] = weights[i]*kernel[abs(d)]/weights[j] + identities += 1 + else: + a[i][j] = lower(f) + boundary = [j for cell in cells for j in cell[:w]+cell[-w:]] + interior = [j for j in range(s) if j not in boundary] + take = lambda rows, cols: [[a[i][j] for j in cols] for i in rows] + ii = inverse(take(interior, interior)) + bi, ib = take(boundary, interior), take(interior, boundary) + schur = sub(take(boundary, boundary), multiply(multiply(bi, ii), ib)) + assert gap(schur) >= gap(a) > 0 + assert all(schur[i][j] == 0 for i in range(len(boundary)) for j in range(len(boundary)) + if min(abs(i-j), len(boundary)-abs(i-j)) > 2*w) + return schur, dict(a=a, ii=ii, bi=bi, ib=ib, boundary=boundary, cells=cells, + interior=interior, identities=identities, gaussian_values=len(cache)) + + +def check_solve(name, a, width, bits=192): + n = len(a) + b = [[Q(i == j) for j in range(n)]+[Q((i*17)%23-11, 8), Q(1)] for i in range(n)] + exact = multiply(inverse(a), b) + table = prepare(a, width, bits) + count = counter() + got = solve(table, b, count) + err = max_entry(sub(got, exact)) + residual = max_entry(sub(multiply(a, got), b)) + assert err <= residual/gap(a) + assert err < Q(1, 1 << 96) + # Algebraic verification of the complete unrounded blocked program. + exact_table = prepare(a, width, None) + exact_count = counter() + assert solve(exact_table, b, exact_count) == exact + h = table['h'] + assert count['scalar_products'] == count['tiles']*7**(h.bit_length()-1) + return dict(name=name, dimension=n, bandwidth=width, block_width=h, + rhs=n+2, work_bits=bits, entries=n*(n+2), gap=str(gap(a)), + inverse_norm_upper=outward(norm(inverse(a))), + error_upper=outward(err), residual_upper=outward(residual), + counter=count), (table, b, exact) + + +def full_schur(a, case, width, bits=192): + from batched import grid + n = len(case['a']) + b = [[Q(i == j) for j in range(n)]+[Q((i*11)%17-8, 8)] for i in range(n)] + bi = [b[i] for i in case['interior']] + bb = [b[i] for i in case['boundary']] + local = multiply(case['ii'], bi) # Exact local reference, NOT a new GS claim. + h = 1 << (width-1).bit_length() + count = counter() + bg = [[j for j, i in enumerate(case['boundary']) if i in cell] for cell in case['cells']] + ig = [[j for j, i in enumerate(case['interior']) if i in cell] for cell in case['cells']] + bp = compile_coupling(case['bi'], bg, ig, h, bits) + ip = compile_coupling(case['ib'], ig, bg, h, bits) + assert coupling(bp, local, counter()) == grid(multiply(grid(case['bi'], bits), local), bits) + rhs = grid(sub(bb, coupling(bp, local, count)), bits) + xb = solve(prepare(a, width, bits), rhs, count) + xi = multiply(case['ii'], sub(bi, coupling(ip, xb, count))) + got = [[Q(0)]*len(b[0]) for _ in range(n)] + for i, row in zip(case['boundary'], xb): + got[i] = row + for i, row in zip(case['interior'], xi): + got[i] = row + expected = multiply(inverse(case['a']), b) + err = max_entry(sub(expected, got)) + assert err < Q(1, 1 << 80) + return dict(dimension=n, rhs=n+1, compared_entries=n*(n+1), + error_upper=outward(err), local_inverse='exact dense reference', + boundary_and_couplings='rounded batched products', + coupling_pages=len(bp['pages'])+len(ip['pages']), + coupling_max_page_entries=max(len(p['rows'])*len(p['cols']) for p in bp['pages']+ip['pages'])) + + +def layout_checks(): + """Actual stable binary partitions on complete records; undo each move.""" + cases = entries = moves = 0 + for axis, spectator, h, tail in cartesian((5, 8, 11), (9, 16, 19), (2, 4, 8), (1, 3)): + padded = 1 << (spectator-1).bit_length() + assert padded % h == 0 + # One spectator field is padded; original values retain unique labels. + original = [(a, b, c) if b < spectator else None + for a in range(axis) for b in range(padded) for c in range(tail)] + # Move axis past the high spectator bits. Each stable split moves one + # complete binary field across the entire axis without random lookup. + groups = [original] + high_bits = (padded//h).bit_length()-1 + for bit in reversed(range(high_bits)): + new = [] + # Maintain explicit coordinates alongside padded-zero records. + # At each level the current spectator high-bit prefix is fixed. + group_span = padded >> (high_bits-1-bit) + for group in groups: + half = group_span//2 + left, right = [], [] + for a in range(axis): + chunk = group[a*group_span*tail:(a+1)*group_span*tail] + left.extend(chunk[:half*tail]) + right.extend(chunk[half*tail:]) + new.extend([left, right]) + moves += len(group) + groups = new + got = [x for group in groups for x in group] + expected = [(a, block*h+b, c) if block*h+b < spectator else None + for block in range(padded//h) for a in range(axis) + for b in range(h) for c in range(tail)] + assert got == expected + # Reverse the exact two-tape split chronology by complete chunk merges. + for level in reversed(range(high_bits)): + group_span = padded >> level + half = group_span//2 + merged = [] + for i in range(0, len(groups), 2): + left, right = groups[i:i+2] + merged.append([x for a in range(axis) + for chunk in (left[a*half*tail:(a+1)*half*tail], + right[a*half*tail:(a+1)*half*tail]) for x in chunk]) + groups = merged + assert groups == [original] + assert padded < 2*spectator + cases += 1 + entries += len(original) + return dict(cases=cases, padded_records=entries, forward_record_moves=moves, + checked_inverse=True, one_field_padding=True) + + +def mutations(table, b, exact): + tests = [] + def reject(name, t, rhs=b): + got = solve(t, rhs, counter()) + discrepancy = max_entry(sub(got, exact)) + scaled = discrepancy*(1 << 80) + lower = Q(scaled.numerator//scaled.denominator, 1 << 80) + assert lower > Q(1, 1 << 60), name + tests.append(dict(name=name, discrepancy_lower=str(lower))) + t = deepcopy(table) + for block in t['low']['blocks']: + block['a'] = [[-x for x in row] for row in block['a']] + reject('wrong-forward-transfer-sign', t) + t = deepcopy(table) + t['support'] = [] + reject('omit-cyclic-correction', t) + t = deepcopy(table) + t['ki'] = list(reversed(t['ki'])) + reject('wrong-border-order', t) + t = deepcopy(table) + for block in t['high']['blocks']: + block['c'] = list(map(list, zip(*block['c']))) + reject('transpose-diagonal-inverse', t) + reject('wrong-rhs-row-order', table, list(reversed(b))) + t = deepcopy(table) + t['bits'] = t['low']['bits'] = t['high']['bits'] = 16 + reject('insufficient-output-precision', t) + return tests + + +def run(): + multiplication = [] + for n in (1, 2, 4, 8, 16): + a = [[Q((i*7+j*11)%13-6, 8) for j in range(n)] for i in range(n)] + b = [[Q((i*5-j*3)%17-8, 16) for j in range(n)] for i in range(n)] + count = counter() + assert strassen(a, b, count) == multiply(a, b) + assert count['scalar_products'] == 7**(n.bit_length()-1) + assert count['scalar_additions'] == 6*(count['scalar_products']-n*n) + multiplication.append(dict(n=n, entries=n*n, **count)) + cases = [] + mut_source = None + for n, w in ((4, 2), (6, 3), (8, 4), (5, 1), (9, 2), (17, 3), (24, 4)): + for near in (False, True): + row, sources = check_solve(f'signed-{n}-{w}-{near}', signed_case(n, w, near), w) + cases.append(row) + if (n, w, near) == (17, 3, False): + mut_source = sources + row, _ = check_solve('identity-no-wrap', [[Q(i == j) for j in range(9)] for i in range(9)], 2) + cases.append(row) + gaussian, compositions = [], [] + for s, t, u, w in ((24, 26, 4, 1), (48, 50, 4, 2)): + raw, ctx = gaussian_schur(s, t, u, w, 256) + a = grid(raw, 256) + assert gap(a) > gap(raw)/2 + row, _ = check_solve(f'gaussian-{s}-{t}-{u}-{w}', a, 2*w, 256) + row.update(source_shape=[s, t, u, w], gaussian_values=ctx['gaussian_values'], + phase_identities=ctx['identities']) + gaussian.append(row) + compositions.append(full_schur(a, ctx, 2*w, 256)) + # Exact dyadic exponent certificate: log_2(7)<45/16. + assert 7**16 < 2**45 + # Uniform inequalities after the elementary p<=2^p bound, p>=101. + assert 35+9*101-32768*101 < -1 + assert 10-32*101 < -2 and 209-64*101 < -2 and 11-64*101 < -2 + exponent_rows = [] + for r in (Q(1, 1000000), Q(1, 1000), Q(1, 20), Q(1, 5)): + old, new = r, 1-Q(29, 32)*(1-r) + assert new-old == Q(3, 32)*(1-r) > 0 + exponent_rows.append(dict(r=str(r), old_boundary_margin=str(old), + new_boundary_margin=str(new))) + return dict(strassen=multiplication, cyclic_cases=cases, gaussian_cases=gaussian, + complete_schur=compositions, layouts=layout_checks(), + rejected_mutants=mutations(*mut_source), exponent_rows=exponent_rows, + scalar_exponent_upper='45/16', boundary_exponent='29*(1-r)/32', + kappa_claim=None, all_size_status='conditional written transfer; not finite proof') + + +if __name__ == '__main__': + import json + print(json.dumps(run(), indent=2, sort_keys=True)) diff --git a/research/batched-gaussian-boundary/verify.py b/research/batched-gaussian-boundary/verify.py new file mode 100644 index 0000000000..3255278845 --- /dev/null +++ b/research/batched-gaussian-boundary/verify.py @@ -0,0 +1,54 @@ +#!/usr/bin/env python3 +"""Source-bound exact controls for batched Gaussian boundary inverses.""" +import argparse +import hashlib +import json +from pathlib import Path +import sys + +assert __debug__, 'verification requires assertions' +ROOT = Path(__file__).resolve().parent +REPO = ROOT.parents[1] +sys.path.insert(0, str(ROOT/'code')) +read = lambda p: json.loads(p.read_text()) +sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest() + + +def integrity(): + actual = {p.relative_to(ROOT).as_posix(): sha(p) for p in ROOT.rglob('*') + if p.is_file() and p.name != 'MANIFEST.json' and '__pycache__' not in p.parts} + assert actual == read(ROOT/'MANIFEST.json') + for name, digest in read(ROOT/'SOURCE.json')['files'].items(): + assert sha(REPO/name) == digest, name + + +def main(): + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('output', type=Path) + out = ap.parse_args().output.resolve() + assert not out.exists() and not out.is_relative_to(ROOT) + integrity() + from check import run + checked = run() + assert checked == read(ROOT/'EXPECTED.json') + summary = dict(cyclic_systems=len(checked['cyclic_cases']), + gaussian_systems=len(checked['gaussian_cases']), + inverse_entries=sum(x['entries'] for x in checked['cyclic_cases']+checked['gaussian_cases']), + complete_schur_entries=sum(x['compared_entries'] for x in checked['complete_schur']), + strassen_entries=sum(x['entries'] for x in checked['strassen']), + layouts=checked['layouts'], mutants=len(checked['rejected_mutants']), + scalar_exponent_upper=checked['scalar_exponent_upper'], + boundary_exponent=checked['boundary_exponent'], kappa_claim=None) + integrity() + out.mkdir(parents=True) + for name, value in [('CHECKS', checked), ('RESULT', summary)]: + (out/(name+'.json')).write_text(json.dumps(value, indent=2, sort_keys=True)+'\n') + receipt = dict(status='PASS_BATCHED_GAUSSIAN_BOUNDARY_CONTROLS', python=sys.version.split()[0], + manifest_sha256=sha(ROOT/'MANIFEST.json'), source_sha256=sha(ROOT/'SOURCE.json'), + checks_sha256=sha(out/'CHECKS.json'), result_sha256=sha(out/'RESULT.json')) + (out/'RECEIPT.json').write_text(json.dumps(receipt, indent=2, sort_keys=True)+'\n') + print(json.dumps(receipt, indent=2)) + + +if __name__ == '__main__': + main() diff --git a/research/branchfree-gaussian-inverse-validation/CHECKS.json b/research/branchfree-gaussian-inverse-validation/CHECKS.json new file mode 100644 index 0000000000..d9c2c932e8 --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/CHECKS.json @@ -0,0 +1,675 @@ +{ + "complete_schur": [ + { + "boundary_counts": { + "scalar_additions": 6552, + "scalar_products": 2548, + "tiles": 364 + }, + "entries": 624, + "error_upper": "968507718467548155118008430081/22835963083295358096932575511191922182123945984", + "global_matrix": "unchanged truncated H", + "local_cells": [ + { + "changed_source": true, + "inverse_difference_upper": "940024533057251354506092454551/1461501637330902918203684832716283019655932542976", + "n": 4, + "perturbation_bound": "43503173352049887299234555894481/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "939971288725099434527530080753/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "117935757587472989159012326393/182687704666362864775460604089535377456991567872", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "62013003857105645328684408473057/1461501637330902918203684832716283019655932542976", + "n": 10, + "perturbation_bound": "1536180037940342613466150025690278995/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "61984493981458932309034940585597/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "1996320489344487560550649765469/45671926166590716193865151022383844364247891968", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "15503250661523559447651187380887/365375409332725729550921208179070754913983135744", + "n": 4, + "perturbation_bound": "23295586318870023093565528926282933/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "61984493981458932309034940585597/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "63882255659000391470443532244609/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + } + ], + "local_counts": { + "convolutions": 312, + "diagonal_products": 4680, + "integer_products": 1248, + "max_operand_bits": 5426 + }, + "residual_upper": "15496123495411148039110356010555/365375409332725729550921208179070754913983135744", + "rhs": 26, + "schur": "exactly the original H Schur, rounded by the pinned solver", + "shape": [ + 24, + 26, + 4, + 1 + ] + }, + { + "boundary_counts": { + "scalar_additions": 72072, + "scalar_products": 17836, + "tiles": 364 + }, + "entries": 2400, + "error_upper": "396728575/1461501637330902918203684832716283019655932542976", + "global_matrix": "unchanged truncated H", + "local_cells": [ + { + "changed_source": true, + "inverse_difference_upper": "17142641/1461501637330902918203684832716283019655932542976", + "n": 8, + "perturbation_bound": "161864862426255/365375409332725729550921208179070754913983135744", + "perturbation_upper": "17120195/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "17646185/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "397654273/1461501637330902918203684832716283019655932542976", + "n": 20, + "perturbation_bound": "109982080334415200313/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "99043289/365375409332725729550921208179070754913983135744", + "resolvent_upper": "431698117/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "397654273/1461501637330902918203684832716283019655932542976", + "n": 8, + "perturbation_bound": "988001034753287495/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "99043289/365375409332725729550921208179070754913983135744", + "resolvent_upper": "431698117/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + } + ], + "local_counts": { + "convolutions": 600, + "diagonal_products": 18000, + "integer_products": 2400, + "max_operand_bits": 12217 + }, + "residual_upper": "396450775/1461501637330902918203684832716283019655932542976", + "rhs": 50, + "schur": "exactly the original H Schur, rounded by the pinned solver", + "shape": [ + 48, + 50, + 4, + 2 + ] + } + ], + "identities": [ + { + "inverse_entries": 1, + "ldl_entries": 1, + "n": 1, + "q": "1/4" + }, + { + "inverse_entries": 1, + "ldl_entries": 1, + "n": 1, + "q": "1/16" + }, + { + "inverse_entries": 1, + "ldl_entries": 1, + "n": 1, + "q": "1/256" + }, + { + "inverse_entries": 4, + "ldl_entries": 4, + "n": 2, + "q": "1/4" + }, + { + "inverse_entries": 4, + "ldl_entries": 4, + "n": 2, + "q": "1/16" + }, + { + "inverse_entries": 4, + "ldl_entries": 4, + "n": 2, + "q": "1/256" + }, + { + "inverse_entries": 9, + "ldl_entries": 9, + "n": 3, + "q": "1/4" + }, + { + "inverse_entries": 9, + "ldl_entries": 9, + "n": 3, + "q": "1/16" + }, + { + "inverse_entries": 9, + "ldl_entries": 9, + "n": 3, + "q": "1/256" + }, + { + "inverse_entries": 16, + "ldl_entries": 16, + "n": 4, + "q": "1/4" + }, + { + "inverse_entries": 16, + "ldl_entries": 16, + "n": 4, + "q": "1/16" + }, + { + "inverse_entries": 16, + "ldl_entries": 16, + "n": 4, + "q": "1/256" + }, + { + "inverse_entries": 25, + "ldl_entries": 25, + "n": 5, + "q": "1/4" + }, + { + "inverse_entries": 25, + "ldl_entries": 25, + "n": 5, + "q": "1/16" + }, + { + "inverse_entries": 25, + "ldl_entries": 25, + "n": 5, + "q": "1/256" + }, + { + "inverse_entries": 36, + "ldl_entries": 36, + "n": 6, + "q": "1/4" + }, + { + "inverse_entries": 36, + "ldl_entries": 36, + "n": 6, + "q": "1/16" + }, + { + "inverse_entries": 36, + "ldl_entries": 36, + "n": 6, + "q": "1/256" + }, + { + "inverse_entries": 49, + "ldl_entries": 49, + "n": 7, + "q": "1/4" + }, + { + "inverse_entries": 49, + "ldl_entries": 49, + "n": 7, + "q": "1/16" + }, + { + "inverse_entries": 49, + "ldl_entries": 49, + "n": 7, + "q": "1/256" + }, + { + "inverse_entries": 64, + "ldl_entries": 64, + "n": 8, + "q": "1/4" + }, + { + "inverse_entries": 64, + "ldl_entries": 64, + "n": 8, + "q": "1/16" + }, + { + "inverse_entries": 64, + "ldl_entries": 64, + "n": 8, + "q": "1/256" + }, + { + "inverse_entries": 81, + "ldl_entries": 81, + "n": 9, + "q": "1/4" + }, + { + "inverse_entries": 81, + "ldl_entries": 81, + "n": 9, + "q": "1/16" + }, + { + "inverse_entries": 81, + "ldl_entries": 81, + "n": 9, + "q": "1/256" + }, + { + "inverse_entries": 100, + "ldl_entries": 100, + "n": 10, + "q": "1/4" + }, + { + "inverse_entries": 100, + "ldl_entries": 100, + "n": 10, + "q": "1/16" + }, + { + "inverse_entries": 100, + "ldl_entries": 100, + "n": 10, + "q": "1/256" + }, + { + "inverse_entries": 121, + "ldl_entries": 121, + "n": 11, + "q": "1/4" + }, + { + "inverse_entries": 121, + "ldl_entries": 121, + "n": 11, + "q": "1/16" + }, + { + "inverse_entries": 121, + "ldl_entries": 121, + "n": 11, + "q": "1/256" + }, + { + "inverse_entries": 144, + "ldl_entries": 144, + "n": 12, + "q": "1/4" + }, + { + "inverse_entries": 144, + "ldl_entries": 144, + "n": 12, + "q": "1/16" + }, + { + "inverse_entries": 144, + "ldl_entries": 144, + "n": 12, + "q": "1/256" + } + ], + "kappa_claim": null, + "rejected_mutants": [ + { + "discrepancy_lower": "1/65536", + "name": "drop-middle-f" + }, + { + "discrepancy_lower": "1/65536", + "name": "reverse-h" + }, + { + "discrepancy_lower": "1/65536", + "name": "drop-signs" + }, + { + "discrepancy_lower": "1/65536", + "name": "omit-weight-reciprocal" + }, + { + "discrepancy_lower": "1/65536", + "name": "declare-truncated-source-inverse-exact" + } + ], + "rounded": [ + { + "counts": { + "convolutions": 10, + "diagonal_products": 75, + "integer_products": 40, + "max_operand_bits": 1957 + }, + "direction": 1, + "entries": 15, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 3, + "probes": 5, + "reciprocal_guard_bits": 10, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 10, + "diagonal_products": 75, + "integer_products": 40, + "max_operand_bits": 1957 + }, + "direction": -1, + "entries": 15, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 3, + "probes": 5, + "reciprocal_guard_bits": 10, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 20, + "diagonal_products": 400, + "integer_products": 80, + "max_operand_bits": 6076 + }, + "direction": 1, + "entries": 80, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 8, + "probes": 10, + "reciprocal_guard_bits": 35, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 20, + "diagonal_products": 400, + "integer_products": 80, + "max_operand_bits": 6076 + }, + "direction": -1, + "entries": 80, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 8, + "probes": 10, + "reciprocal_guard_bits": 35, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 38, + "diagonal_products": 1615, + "integer_products": 152, + "max_operand_bits": 14129 + }, + "direction": 1, + "entries": 323, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 17, + "probes": 19, + "reciprocal_guard_bits": 80, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 38, + "diagonal_products": 1615, + "integer_products": 152, + "max_operand_bits": 14129 + }, + "direction": -1, + "entries": 323, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 17, + "probes": 19, + "reciprocal_guard_bits": 80, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 52, + "diagonal_products": 3120, + "integer_products": 208, + "max_operand_bits": 20947 + }, + "direction": 1, + "entries": 624, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 24, + "probes": 26, + "reciprocal_guard_bits": 115, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 52, + "diagonal_products": 3120, + "integer_products": 208, + "max_operand_bits": 20947 + }, + "direction": -1, + "entries": 624, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 24, + "probes": 26, + "reciprocal_guard_bits": 115, + "work_bits": 384 + } + ], + "scope": "local branch-free replacement and retained Schur error transfer; no joint-axis evaluator", + "tensor_and_weighted": { + "scope": "exact identities and norm bounds, no fast joint evaluator", + "tensor_identities": [ + { + "entries": 36, + "shape": [ + 2, + 3 + ], + "stages": 5 + }, + { + "entries": 144, + "shape": [ + 3, + 4 + ], + "stages": 5 + }, + { + "entries": 576, + "shape": [ + 2, + 3, + 4 + ], + "stages": 5 + } + ], + "weighted_factors": [ + { + "base": "1/2", + "entries": 32, + "maximum_measured_norm": "231306209482210194248322882336200536391844315953/182687704666362864775460604089535377456991567872", + "n": 4, + "norm_upper": "2087859481901289883148121189594690028079903632823/1461501637330902918203684832716283019655932542976" + }, + { + "base": "3/4", + "entries": 32, + "maximum_measured_norm": "1329195694931578701123897232924574758905790863747/730750818665451459101842416358141509827966271488", + "n": 4, + "norm_upper": "3579187683259354085396779182162325762422691941983/1461501637330902918203684832716283019655932542976" + }, + { + "base": "1/2", + "entries": 128, + "maximum_measured_norm": "925036349554720793081590418579027855921129881785/730750818665451459101842416358141509827966271488", + "n": 8, + "norm_upper": "2087859481901289883148121189594690028079903632823/1461501637330902918203684832716283019655932542976" + }, + { + "base": "3/4", + "entries": 128, + "maximum_measured_norm": "2601347409204216641591592865688601491295957135701/1461501637330902918203684832716283019655932542976", + "n": 8, + "norm_upper": "3579187683259354085396779182162325762422691941983/1461501637330902918203684832716283019655932542976" + }, + { + "base": "1/2", + "entries": 512, + "maximum_measured_norm": "1850071216850754925277227446659532501334482763893/1461501637330902918203684832716283019655932542976", + "n": 16, + "norm_upper": "2087859481901289883148121189594690028079903632823/1461501637330902918203684832716283019655932542976" + }, + { + "base": "3/4", + "entries": 512, + "maximum_measured_norm": "2594975433742572471051731029402405853069433824383/1461501637330902918203684832716283019655932542976", + "n": 16, + "norm_upper": "3579187683259354085396779182162325762422691941983/1461501637330902918203684832716283019655932542976" + }, + { + "base": "7/8", + "entries": 512, + "maximum_measured_norm": "922174111645836762918234662670247789566278580305/365375409332725729550921208179070754913983135744", + "n": 16, + "norm_upper": "3340575171042063813036993903351504044927845812517/730750818665451459101842416358141509827966271488" + } + ] + }, + "tensor_precision_guard": { + "claim": "P-grid materialization of the unweighted tensor kernel can fail after reweighting", + "dense_toy": { + "accepted_work_bits": 30, + "erased_significant_entries": 28, + "failed_work_bits": 14, + "operator_entries": 4096, + "operator_error_by_precision": { + "14": "4433383333067397163866710212156498783637756195249179711/97792372158490879603397173722893144054209601882823000000", + "30": "60443539822991295725178716294649065304113869247316742643/51271367214230866285505897416828200709893443751941505024000000" + }, + "scalar_target_bits": 8, + "scope": "small rational geometry; not the asymptotic p>=101 setting", + "shape": [ + 4, + 4, + 4 + ] + }, + "excluded_claims": [ + "no FFT lower bound", + "no barrier for implicit or adaptive-precision kernels", + "no counterexample to the per-axis evaluator" + ], + "symbolic_rows": [ + { + "a": 26, + "log2_d": 104, + "log2_p": 260, + "log2_u": 104, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "182125208646162100398699553764695918031665880093608616395335600918479086741192966145/60708402882054033466233184588234965832575213720379360039119137804340758912662765568", + "weighted_exponent_over_p": "49042850463061697156643727992212104385903693051046395897/784637716923335095479473677900958302012794430558004314112", + "work_precision_ratio": 32768 + }, + { + "a": 27, + "log2_d": 108, + "log2_p": 270, + "log2_u": 108, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "372992427307339981616536686110114480703686463681367018995559066279555181921902373371905/62165404551223330269422781018352605012557018849668464680057997111644937126566671941632", + "weighted_exponent_over_p": "6277484859271897236050381281594310258391642156569697714169/100433627766186892221372630771322662657637687111424552206336", + "work_precision_ratio": 32768 + }, + { + "a": 32, + "log2_d": 128, + "log2_p": 320, + "log2_u": 128, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "13438468453066825263344653683410665668690380874032188264388215345061092448040441548046684435477507866625/69992023193056381579920071267763883691301421788582797965624659405118495974380029543152421664737722368", + "weighted_exponent_over_p": "215692737373663688005673360451999480760949722525752928371425861959673/3450873173395281893717377931138512726225554486085193277581262111899648", + "work_precision_ratio": 32768 + }, + { + "a": 64, + "log2_d": 256, + "log2_p": 640, + "log2_u": 256, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "123284435192540004075960700380003015598836089128668137331990958665673409866336767063126517051099901214585702388424557385811948629798701646793864827909532526196569516712275660687462080536365177130455696381313025/149502054158244092924433911175587146134101311725520811805218980426523448679093940601025751001247626027946551200107541538756647476310030352326743206124657514520641361489437161884315621531536712531968", + "weighted_exponent_over_p": "5815064696085702588696616500119606589543170749444192586774353959456094189802497283705464162611174341212676407241463861315733791807897593/93035356709837681990313447409664580397266094167976711716030745495121828878514934185752454491361736391777602765602070775492429008462675968", + "work_precision_ratio": 32768 + } + ], + "uniform_weighted_ratio_bound": "16513/262144" + }, + "uniform_bounds": [ + { + "gap_at_p101": 3304405, + "intercept": -12, + "name": "rounded-source term below 2^-40p", + "slope": 32717 + }, + { + "gap_at_p101": 97, + "intercept": -4, + "name": "tail below half 2^-39p", + "slope": 1 + }, + { + "gap_at_p101": 3834, + "intercept": -4, + "name": "resolvent smallness 8p*2^-39p<1/2", + "slope": 38 + }, + { + "gap_at_p101": 94, + "intercept": -7, + "name": "inverse perturbation <=2^-37p", + "slope": 1 + }, + { + "gap_at_p101": 3301791, + "intercept": 0, + "name": "rounded local <=2^-37p", + "slope": 32691 + }, + { + "gap_at_p101": 91, + "intercept": -10, + "name": "composition local <=2^-34p", + "slope": 1 + }, + { + "gap_at_p101": 3301690, + "intercept": 0, + "name": "boundary composition <=2^-34p", + "slope": 32690 + }, + { + "gap_at_p101": 3121, + "intercept": -10, + "name": "final 2^-32p below 2^-p-10", + "slope": 31 + } + ] +} diff --git a/research/branchfree-gaussian-inverse-validation/README.md b/research/branchfree-gaussian-inverse-validation/README.md new file mode 100644 index 0000000000..60d8900052 --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/README.md @@ -0,0 +1,36 @@ +# Fresh validation of the branch-free local inverse + +The full source-bound verifier passed on macOS Python 3.11.15 and 3.14.8, +and Linux aarch64 Python 3.12.3 on Spark 2. Every run rebuilt all finite +checks; no computational receipt was reused. Complete CHECKS.json and +RESULT.json are byte-identical across all three runs. Each receipt binds +the same package manifest and upstream-source hashes. The Linux systemd +unit ended with exit 0, inactive state and MainPID 0. + +Commands from the repository root: + +```sh +python3.11 -B research/branchfree-gaussian-inverse/verify.py /tmp/branchfree-311 +python3.14 -B research/branchfree-gaussian-inverse/verify.py /tmp/branchfree-314 +python3.12 -B research/branchfree-gaussian-inverse/verify.py /tmp/branchfree-312 +``` + +The macOS 3.11 executable came from the existing verification virtualenv; +the bare python3.11 alias was absent, detected before verifier execution. +Linux used /usr/bin/python3. Use a new output directory for every run. +The Linux job was bounded to 900 seconds, 200% CPU and 8 GiB RAM. + +These are exact rational finite arithmetic and error checks. They execute +the new packed interior convolutions and the old rounded batched boundary +and sparse coupling maps. The complete-Schur reference is an independent +dense inverse of the unchanged source H. The conditional all-size proof, +not these samples, supplies the general error/tape transfer. No fast joint +weighted evaluator, complete multiplication theorem or new kappa is claimed. + +The updated package also checks 4,096 entries of a dense three-axis operator: +a 14-bit unweighted kernel grid erases 28 entries above the 8-bit error +target, while a 30-bit grid passes. Four symbolic parameter rows support +the separate all-size precision counterexample; their tensors are not +executed. The full wrappers above were all rerun after adding this guard, +and their complete outputs again match byte for byte. The previous +receipts remain available at the initial PR commit. diff --git a/research/branchfree-gaussian-inverse-validation/RESULT.json b/research/branchfree-gaussian-inverse-validation/RESULT.json new file mode 100644 index 0000000000..35e3c36a24 --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/RESULT.json @@ -0,0 +1,16 @@ +{ + "exact_cases": 36, + "exact_inverse_entries": 1950, + "exact_ldl_entries": 1950, + "full_schur_cases": 2, + "full_schur_entries": 3024, + "joint_kernel_guard_entries": 4096, + "joint_kernel_symbolic_rows": 4, + "kappa_claim": null, + "mutants": 5, + "rounded_cases": 8, + "rounded_entries": 2084, + "scope": "local branch-free replacement and retained Schur error transfer; no joint-axis evaluator", + "tensor_entries": 756, + "weighted_factor_entries": 1856 +} diff --git a/research/branchfree-gaussian-inverse-validation/linux-output.log b/research/branchfree-gaussian-inverse-validation/linux-output.log new file mode 100644 index 0000000000..8f578b63d8 --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/linux-output.log @@ -0,0 +1,8 @@ +{ + "status": "PASS_BRANCHFREE_GAUSSIAN_INVERSE", + "python": "3.12.3", + "manifest_sha256": "82f51ce25d928426587f1f1c716468e9af6c455fbadb75eb30a0e13238165bdc", + "source_sha256": "832c1cd38cc8fa2c61b9fe455ace113606ff9fd3e335fad875cc41f253c3b855", + "checks_sha256": "5871a9000ace422f88a87792753b07fecec76090a7943c4658e05594d4509041", + "result_sha256": "170c7316c7bb8dda803b2dad879896cc113cf40f495448647cc70d06be4b82c5" +} diff --git a/research/branchfree-gaussian-inverse-validation/linux312-RECEIPT.json b/research/branchfree-gaussian-inverse-validation/linux312-RECEIPT.json new file mode 100644 index 0000000000..ae013a5514 --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/linux312-RECEIPT.json @@ -0,0 +1,8 @@ +{ + "checks_sha256": "5871a9000ace422f88a87792753b07fecec76090a7943c4658e05594d4509041", + "manifest_sha256": "82f51ce25d928426587f1f1c716468e9af6c455fbadb75eb30a0e13238165bdc", + "python": "3.12.3", + "result_sha256": "170c7316c7bb8dda803b2dad879896cc113cf40f495448647cc70d06be4b82c5", + "source_sha256": "832c1cd38cc8fa2c61b9fe455ace113606ff9fd3e335fad875cc41f253c3b855", + "status": "PASS_BRANCHFREE_GAUSSIAN_INVERSE" +} diff --git a/research/branchfree-gaussian-inverse-validation/macos311-RECEIPT.json b/research/branchfree-gaussian-inverse-validation/macos311-RECEIPT.json new file mode 100644 index 0000000000..202356c1f3 --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/macos311-RECEIPT.json @@ -0,0 +1,8 @@ +{ + "checks_sha256": "5871a9000ace422f88a87792753b07fecec76090a7943c4658e05594d4509041", + "manifest_sha256": "82f51ce25d928426587f1f1c716468e9af6c455fbadb75eb30a0e13238165bdc", + "python": "3.11.15", + "result_sha256": "170c7316c7bb8dda803b2dad879896cc113cf40f495448647cc70d06be4b82c5", + "source_sha256": "832c1cd38cc8fa2c61b9fe455ace113606ff9fd3e335fad875cc41f253c3b855", + "status": "PASS_BRANCHFREE_GAUSSIAN_INVERSE" +} diff --git a/research/branchfree-gaussian-inverse-validation/macos314-RECEIPT.json b/research/branchfree-gaussian-inverse-validation/macos314-RECEIPT.json new file mode 100644 index 0000000000..3d9757e36e --- /dev/null +++ b/research/branchfree-gaussian-inverse-validation/macos314-RECEIPT.json @@ -0,0 +1,8 @@ +{ + "checks_sha256": "5871a9000ace422f88a87792753b07fecec76090a7943c4658e05594d4509041", + "manifest_sha256": "82f51ce25d928426587f1f1c716468e9af6c455fbadb75eb30a0e13238165bdc", + "python": "3.14.8", + "result_sha256": "170c7316c7bb8dda803b2dad879896cc113cf40f495448647cc70d06be4b82c5", + "source_sha256": "832c1cd38cc8fa2c61b9fe455ace113606ff9fd3e335fad875cc41f253c3b855", + "status": "PASS_BRANCHFREE_GAUSSIAN_INVERSE" +} diff --git a/research/branchfree-gaussian-inverse/EXPECTED.json b/research/branchfree-gaussian-inverse/EXPECTED.json new file mode 100644 index 0000000000..d9c2c932e8 --- /dev/null +++ b/research/branchfree-gaussian-inverse/EXPECTED.json @@ -0,0 +1,675 @@ +{ + "complete_schur": [ + { + "boundary_counts": { + "scalar_additions": 6552, + "scalar_products": 2548, + "tiles": 364 + }, + "entries": 624, + "error_upper": "968507718467548155118008430081/22835963083295358096932575511191922182123945984", + "global_matrix": "unchanged truncated H", + "local_cells": [ + { + "changed_source": true, + "inverse_difference_upper": "940024533057251354506092454551/1461501637330902918203684832716283019655932542976", + "n": 4, + "perturbation_bound": "43503173352049887299234555894481/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "939971288725099434527530080753/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "117935757587472989159012326393/182687704666362864775460604089535377456991567872", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "62013003857105645328684408473057/1461501637330902918203684832716283019655932542976", + "n": 10, + "perturbation_bound": "1536180037940342613466150025690278995/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "61984493981458932309034940585597/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "1996320489344487560550649765469/45671926166590716193865151022383844364247891968", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "15503250661523559447651187380887/365375409332725729550921208179070754913983135744", + "n": 4, + "perturbation_bound": "23295586318870023093565528926282933/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "61984493981458932309034940585597/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "63882255659000391470443532244609/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + } + ], + "local_counts": { + "convolutions": 312, + "diagonal_products": 4680, + "integer_products": 1248, + "max_operand_bits": 5426 + }, + "residual_upper": "15496123495411148039110356010555/365375409332725729550921208179070754913983135744", + "rhs": 26, + "schur": "exactly the original H Schur, rounded by the pinned solver", + "shape": [ + 24, + 26, + 4, + 1 + ] + }, + { + "boundary_counts": { + "scalar_additions": 72072, + "scalar_products": 17836, + "tiles": 364 + }, + "entries": 2400, + "error_upper": "396728575/1461501637330902918203684832716283019655932542976", + "global_matrix": "unchanged truncated H", + "local_cells": [ + { + "changed_source": true, + "inverse_difference_upper": "17142641/1461501637330902918203684832716283019655932542976", + "n": 8, + "perturbation_bound": "161864862426255/365375409332725729550921208179070754913983135744", + "perturbation_upper": "17120195/1461501637330902918203684832716283019655932542976", + "resolvent_upper": "17646185/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "397654273/1461501637330902918203684832716283019655932542976", + "n": 20, + "perturbation_bound": "109982080334415200313/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "99043289/365375409332725729550921208179070754913983135744", + "resolvent_upper": "431698117/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + }, + { + "changed_source": true, + "inverse_difference_upper": "397654273/1461501637330902918203684832716283019655932542976", + "n": 8, + "perturbation_bound": "988001034753287495/1461501637330902918203684832716283019655932542976", + "perturbation_upper": "99043289/365375409332725729550921208179070754913983135744", + "resolvent_upper": "431698117/1461501637330902918203684832716283019655932542976", + "rounded_operator_error_upper": "1/1461501637330902918203684832716283019655932542976" + } + ], + "local_counts": { + "convolutions": 600, + "diagonal_products": 18000, + "integer_products": 2400, + "max_operand_bits": 12217 + }, + "residual_upper": "396450775/1461501637330902918203684832716283019655932542976", + "rhs": 50, + "schur": "exactly the original H Schur, rounded by the pinned solver", + "shape": [ + 48, + 50, + 4, + 2 + ] + } + ], + "identities": [ + { + "inverse_entries": 1, + "ldl_entries": 1, + "n": 1, + "q": "1/4" + }, + { + "inverse_entries": 1, + "ldl_entries": 1, + "n": 1, + "q": "1/16" + }, + { + "inverse_entries": 1, + "ldl_entries": 1, + "n": 1, + "q": "1/256" + }, + { + "inverse_entries": 4, + "ldl_entries": 4, + "n": 2, + "q": "1/4" + }, + { + "inverse_entries": 4, + "ldl_entries": 4, + "n": 2, + "q": "1/16" + }, + { + "inverse_entries": 4, + "ldl_entries": 4, + "n": 2, + "q": "1/256" + }, + { + "inverse_entries": 9, + "ldl_entries": 9, + "n": 3, + "q": "1/4" + }, + { + "inverse_entries": 9, + "ldl_entries": 9, + "n": 3, + "q": "1/16" + }, + { + "inverse_entries": 9, + "ldl_entries": 9, + "n": 3, + "q": "1/256" + }, + { + "inverse_entries": 16, + "ldl_entries": 16, + "n": 4, + "q": "1/4" + }, + { + "inverse_entries": 16, + "ldl_entries": 16, + "n": 4, + "q": "1/16" + }, + { + "inverse_entries": 16, + "ldl_entries": 16, + "n": 4, + "q": "1/256" + }, + { + "inverse_entries": 25, + "ldl_entries": 25, + "n": 5, + "q": "1/4" + }, + { + "inverse_entries": 25, + "ldl_entries": 25, + "n": 5, + "q": "1/16" + }, + { + "inverse_entries": 25, + "ldl_entries": 25, + "n": 5, + "q": "1/256" + }, + { + "inverse_entries": 36, + "ldl_entries": 36, + "n": 6, + "q": "1/4" + }, + { + "inverse_entries": 36, + "ldl_entries": 36, + "n": 6, + "q": "1/16" + }, + { + "inverse_entries": 36, + "ldl_entries": 36, + "n": 6, + "q": "1/256" + }, + { + "inverse_entries": 49, + "ldl_entries": 49, + "n": 7, + "q": "1/4" + }, + { + "inverse_entries": 49, + "ldl_entries": 49, + "n": 7, + "q": "1/16" + }, + { + "inverse_entries": 49, + "ldl_entries": 49, + "n": 7, + "q": "1/256" + }, + { + "inverse_entries": 64, + "ldl_entries": 64, + "n": 8, + "q": "1/4" + }, + { + "inverse_entries": 64, + "ldl_entries": 64, + "n": 8, + "q": "1/16" + }, + { + "inverse_entries": 64, + "ldl_entries": 64, + "n": 8, + "q": "1/256" + }, + { + "inverse_entries": 81, + "ldl_entries": 81, + "n": 9, + "q": "1/4" + }, + { + "inverse_entries": 81, + "ldl_entries": 81, + "n": 9, + "q": "1/16" + }, + { + "inverse_entries": 81, + "ldl_entries": 81, + "n": 9, + "q": "1/256" + }, + { + "inverse_entries": 100, + "ldl_entries": 100, + "n": 10, + "q": "1/4" + }, + { + "inverse_entries": 100, + "ldl_entries": 100, + "n": 10, + "q": "1/16" + }, + { + "inverse_entries": 100, + "ldl_entries": 100, + "n": 10, + "q": "1/256" + }, + { + "inverse_entries": 121, + "ldl_entries": 121, + "n": 11, + "q": "1/4" + }, + { + "inverse_entries": 121, + "ldl_entries": 121, + "n": 11, + "q": "1/16" + }, + { + "inverse_entries": 121, + "ldl_entries": 121, + "n": 11, + "q": "1/256" + }, + { + "inverse_entries": 144, + "ldl_entries": 144, + "n": 12, + "q": "1/4" + }, + { + "inverse_entries": 144, + "ldl_entries": 144, + "n": 12, + "q": "1/16" + }, + { + "inverse_entries": 144, + "ldl_entries": 144, + "n": 12, + "q": "1/256" + } + ], + "kappa_claim": null, + "rejected_mutants": [ + { + "discrepancy_lower": "1/65536", + "name": "drop-middle-f" + }, + { + "discrepancy_lower": "1/65536", + "name": "reverse-h" + }, + { + "discrepancy_lower": "1/65536", + "name": "drop-signs" + }, + { + "discrepancy_lower": "1/65536", + "name": "omit-weight-reciprocal" + }, + { + "discrepancy_lower": "1/65536", + "name": "declare-truncated-source-inverse-exact" + } + ], + "rounded": [ + { + "counts": { + "convolutions": 10, + "diagonal_products": 75, + "integer_products": 40, + "max_operand_bits": 1957 + }, + "direction": 1, + "entries": 15, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 3, + "probes": 5, + "reciprocal_guard_bits": 10, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 10, + "diagonal_products": 75, + "integer_products": 40, + "max_operand_bits": 1957 + }, + "direction": -1, + "entries": 15, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 3, + "probes": 5, + "reciprocal_guard_bits": 10, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 20, + "diagonal_products": 400, + "integer_products": 80, + "max_operand_bits": 6076 + }, + "direction": 1, + "entries": 80, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 8, + "probes": 10, + "reciprocal_guard_bits": 35, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 20, + "diagonal_products": 400, + "integer_products": 80, + "max_operand_bits": 6076 + }, + "direction": -1, + "entries": 80, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 8, + "probes": 10, + "reciprocal_guard_bits": 35, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 38, + "diagonal_products": 1615, + "integer_products": 152, + "max_operand_bits": 14129 + }, + "direction": 1, + "entries": 323, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 17, + "probes": 19, + "reciprocal_guard_bits": 80, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 38, + "diagonal_products": 1615, + "integer_products": 152, + "max_operand_bits": 14129 + }, + "direction": -1, + "entries": 323, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 17, + "probes": 19, + "reciprocal_guard_bits": 80, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 52, + "diagonal_products": 3120, + "integer_products": 208, + "max_operand_bits": 20947 + }, + "direction": 1, + "entries": 624, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 24, + "probes": 26, + "reciprocal_guard_bits": 115, + "work_bits": 384 + }, + { + "counts": { + "convolutions": 52, + "diagonal_products": 3120, + "integer_products": 208, + "max_operand_bits": 20947 + }, + "direction": -1, + "entries": 624, + "error_upper": "1/1766847064778384329583297500742918515827483896875618958121606201292619776", + "n": 24, + "probes": 26, + "reciprocal_guard_bits": 115, + "work_bits": 384 + } + ], + "scope": "local branch-free replacement and retained Schur error transfer; no joint-axis evaluator", + "tensor_and_weighted": { + "scope": "exact identities and norm bounds, no fast joint evaluator", + "tensor_identities": [ + { + "entries": 36, + "shape": [ + 2, + 3 + ], + "stages": 5 + }, + { + "entries": 144, + "shape": [ + 3, + 4 + ], + "stages": 5 + }, + { + "entries": 576, + "shape": [ + 2, + 3, + 4 + ], + "stages": 5 + } + ], + "weighted_factors": [ + { + "base": "1/2", + "entries": 32, + "maximum_measured_norm": "231306209482210194248322882336200536391844315953/182687704666362864775460604089535377456991567872", + "n": 4, + "norm_upper": "2087859481901289883148121189594690028079903632823/1461501637330902918203684832716283019655932542976" + }, + { + "base": "3/4", + "entries": 32, + "maximum_measured_norm": "1329195694931578701123897232924574758905790863747/730750818665451459101842416358141509827966271488", + "n": 4, + "norm_upper": "3579187683259354085396779182162325762422691941983/1461501637330902918203684832716283019655932542976" + }, + { + "base": "1/2", + "entries": 128, + "maximum_measured_norm": "925036349554720793081590418579027855921129881785/730750818665451459101842416358141509827966271488", + "n": 8, + "norm_upper": "2087859481901289883148121189594690028079903632823/1461501637330902918203684832716283019655932542976" + }, + { + "base": "3/4", + "entries": 128, + "maximum_measured_norm": "2601347409204216641591592865688601491295957135701/1461501637330902918203684832716283019655932542976", + "n": 8, + "norm_upper": "3579187683259354085396779182162325762422691941983/1461501637330902918203684832716283019655932542976" + }, + { + "base": "1/2", + "entries": 512, + "maximum_measured_norm": "1850071216850754925277227446659532501334482763893/1461501637330902918203684832716283019655932542976", + "n": 16, + "norm_upper": "2087859481901289883148121189594690028079903632823/1461501637330902918203684832716283019655932542976" + }, + { + "base": "3/4", + "entries": 512, + "maximum_measured_norm": "2594975433742572471051731029402405853069433824383/1461501637330902918203684832716283019655932542976", + "n": 16, + "norm_upper": "3579187683259354085396779182162325762422691941983/1461501637330902918203684832716283019655932542976" + }, + { + "base": "7/8", + "entries": 512, + "maximum_measured_norm": "922174111645836762918234662670247789566278580305/365375409332725729550921208179070754913983135744", + "n": 16, + "norm_upper": "3340575171042063813036993903351504044927845812517/730750818665451459101842416358141509827966271488" + } + ] + }, + "tensor_precision_guard": { + "claim": "P-grid materialization of the unweighted tensor kernel can fail after reweighting", + "dense_toy": { + "accepted_work_bits": 30, + "erased_significant_entries": 28, + "failed_work_bits": 14, + "operator_entries": 4096, + "operator_error_by_precision": { + "14": "4433383333067397163866710212156498783637756195249179711/97792372158490879603397173722893144054209601882823000000", + "30": "60443539822991295725178716294649065304113869247316742643/51271367214230866285505897416828200709893443751941505024000000" + }, + "scalar_target_bits": 8, + "scope": "small rational geometry; not the asymptotic p>=101 setting", + "shape": [ + 4, + 4, + 4 + ] + }, + "excluded_claims": [ + "no FFT lower bound", + "no barrier for implicit or adaptive-precision kernels", + "no counterexample to the per-axis evaluator" + ], + "symbolic_rows": [ + { + "a": 26, + "log2_d": 104, + "log2_p": 260, + "log2_u": 104, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "182125208646162100398699553764695918031665880093608616395335600918479086741192966145/60708402882054033466233184588234965832575213720379360039119137804340758912662765568", + "weighted_exponent_over_p": "49042850463061697156643727992212104385903693051046395897/784637716923335095479473677900958302012794430558004314112", + "work_precision_ratio": 32768 + }, + { + "a": 27, + "log2_d": 108, + "log2_p": 270, + "log2_u": 108, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "372992427307339981616536686110114480703686463681367018995559066279555181921902373371905/62165404551223330269422781018352605012557018849668464680057997111644937126566671941632", + "weighted_exponent_over_p": "6277484859271897236050381281594310258391642156569697714169/100433627766186892221372630771322662657637687111424552206336", + "work_precision_ratio": 32768 + }, + { + "a": 32, + "log2_d": 128, + "log2_p": 320, + "log2_u": 128, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "13438468453066825263344653683410665668690380874032188264388215345061092448040441548046684435477507866625/69992023193056381579920071267763883691301421788582797965624659405118495974380029543152421664737722368", + "weighted_exponent_over_p": "215692737373663688005673360451999480760949722525752928371425861959673/3450873173395281893717377931138512726225554486085193277581262111899648", + "work_precision_ratio": 32768 + }, + { + "a": 64, + "log2_d": 256, + "log2_p": 640, + "log2_u": 256, + "scope": "symbolic parameter inequalities only; no payload tensor executed", + "unweighted_exponent_over_work": "123284435192540004075960700380003015598836089128668137331990958665673409866336767063126517051099901214585702388424557385811948629798701646793864827909532526196569516712275660687462080536365177130455696381313025/149502054158244092924433911175587146134101311725520811805218980426523448679093940601025751001247626027946551200107541538756647476310030352326743206124657514520641361489437161884315621531536712531968", + "weighted_exponent_over_p": "5815064696085702588696616500119606589543170749444192586774353959456094189802497283705464162611174341212676407241463861315733791807897593/93035356709837681990313447409664580397266094167976711716030745495121828878514934185752454491361736391777602765602070775492429008462675968", + "work_precision_ratio": 32768 + } + ], + "uniform_weighted_ratio_bound": "16513/262144" + }, + "uniform_bounds": [ + { + "gap_at_p101": 3304405, + "intercept": -12, + "name": "rounded-source term below 2^-40p", + "slope": 32717 + }, + { + "gap_at_p101": 97, + "intercept": -4, + "name": "tail below half 2^-39p", + "slope": 1 + }, + { + "gap_at_p101": 3834, + "intercept": -4, + "name": "resolvent smallness 8p*2^-39p<1/2", + "slope": 38 + }, + { + "gap_at_p101": 94, + "intercept": -7, + "name": "inverse perturbation <=2^-37p", + "slope": 1 + }, + { + "gap_at_p101": 3301791, + "intercept": 0, + "name": "rounded local <=2^-37p", + "slope": 32691 + }, + { + "gap_at_p101": 91, + "intercept": -10, + "name": "composition local <=2^-34p", + "slope": 1 + }, + { + "gap_at_p101": 3301690, + "intercept": 0, + "name": "boundary composition <=2^-34p", + "slope": 32690 + }, + { + "gap_at_p101": 3121, + "intercept": -10, + "name": "final 2^-32p below 2^-p-10", + "slope": 31 + } + ] +} diff --git a/research/branchfree-gaussian-inverse/MANIFEST.json b/research/branchfree-gaussian-inverse/MANIFEST.json new file mode 100644 index 0000000000..60608908d7 --- /dev/null +++ b/research/branchfree-gaussian-inverse/MANIFEST.json @@ -0,0 +1,10 @@ +{ + "EXPECTED.json": "5871a9000ace422f88a87792753b07fecec76090a7943c4658e05594d4509041", + "PROOF.md": "77d6a05063372deefeaf366743d49a964f55c0db21af846983abb73718af503a", + "README.md": "5581fb72327614f1a67287fb1c583ab1b9bf1b142c17d1431451352cdc20cf56", + "SOURCE.json": "832c1cd38cc8fa2c61b9fe455ace113606ff9fd3e335fad875cc41f253c3b855", + "code/branchfree.py": "9e9becc3b7599545d73160e6169b91230da06b485ba81bf9b76c6bd33ce4aacc", + "code/check.py": "48a39d00a973f09b082aad796b4d6aef585a2c795da186bfb2fa98f013dd9273", + "code/precision_guard.py": "679e5bebf67866f54d1d0e601c43e5e24d4b325cd5acf4964e43470c599c3d52", + "verify.py": "a7149f72f472ccb8d00cb56de5476d7a3bc73fc85b7a982f32ea187b6f3f0cb8" +} diff --git a/research/branchfree-gaussian-inverse/PROOF.md b/research/branchfree-gaussian-inverse/PROOF.md new file mode 100644 index 0000000000..d3fed999ab --- /dev/null +++ b/research/branchfree-gaussian-inverse/PROOF.md @@ -0,0 +1,304 @@ +# A branch-free interior inverse with an explicit source perturbation + +This replaces only the online phase-cell interior inverse. The rational +truncated global matrix H, exact Schur setup, boundary sets, sparse couplings, +periodic wrap, normalization, locality proof and work precision remain those +of the pinned phase-cell construction. Its exact inverse is approximated, +not identified with a different matrix's exact inverse. + +The result is conditional on the retained resampling and multiplication +interfaces. It gives two triangular convolutions and three diagonal factors +inside the existing similarity, in place of the GS difference of two +convolution pairs. It does not lower the dimension exponent or claim a new +kappa. The finite checker is not a proof of the all-size tape machine. + +## Classical identity and specialized bounds + +Let 0=1, G_ij=q^((i-j)^2), + + f_j=product_(k=1..j)(1-q^(2k)), f_0=1, + g_j=q^(j^2)/f_j, h_j=(-q)^j/f_j. + +Write D_f=diag(f), and T(v) for lower triangular Toeplitz multiplication. +Then + + L=D_f T(g) D_f^-1, + G=L D_f L^T, + T(g) T(h)=I, + G^-1=D_f^-1 T(h)^T D_f T(h) D_f^-1. (1) + +These are established q-calculus identities, not a novelty claim. A primary +source is Alexey Kuznetsov, *Using q-calculus to study LDLT factorization of +a certain Vandermonde matrix*, [Theorems 1 and 2](https://arxiv.org/pdf/1507.02959). +For completeness the specialization is explicit: use his Vandermonde parameter +r=q^-2 and B=diag(q^(j^2)). Then G=B V_r B and +(r;r)_j=(-1)^j q^(-j(j+1)) f_j. Substituting into his triangular factor and +conjugating it by B gives L_ij=q^((i-j)^2)f_i/(f_j f_(i-j)); the diagonal +becomes f_j. This proves the second display. The power series identities +with Q=q^2 give sum g_j z^j=(-qz;Q)_infinity and +sum h_j z^j=1/(-qz;Q)_infinity. Their coefficient product is one. Only +coefficients through n-1 are used, proving the finite triangular inverse +and hence (1), including n=1. + +The elementary product bound product(1-x_k)>=1-sum x_k gives + + 14/15 <= f_j <= 1, + ||D_f^-1|| <= 15/14, + ||T(h)||, ||T(h)^T|| <= (15/14)/(1-q) <= 10/7. (2) + +Thus all five central factors are uniformly bounded. The triangular upper +product is a reversed lower convolution and a reversed retained output. +There is no subtraction of two branches. + +## Keep H and its Schur system exactly as before + +Use all pinned phase-cell hypotheses: integer p>=101, +P=32768p, eta=2^-P, u>=ceil(log2(8p)), u*d<=p, +12^(-16p) and the stated work precision. +Also q<=1/4. Define the *local model only* + + G_tilde_ij=q^((i-j)^2), A_tilde=D_a G_tilde D_a^-1. + +For r<=w the power identity on [0,1] gives +|q^(r^2)-G_hat_r|<4(r^2+1)eta. Summing over a row, using n<=5p, +gives less than 2^11 p^3 eta. For r>w, pi>3 and e>2 imply +q_*^(r^2)<2^(-3u r^2); u*w^2>=16p and the geometric ratio bound give +both tails together less than 4*2^(-48p). Multiplication by the old +similarity condition bound 2^(8p+1) yields + + E=||A_tilde-A|| + < 2^(8p+12) p^3 eta + 2^(-40p+3) + < 2^(-39p). (3) + +No row-dominance assertion about a newly chosen global H is needed. +Because 8p E<1/2, the resolvent identity gives + + ||A_tilde^-1|| <= 16p, + ||A_tilde^-1-A^-1|| <=128p^2 E <=2^(-37p). (4) + +The last elementary bound uses p^2<=2^p for p>=4 and 7<=p. +This is an approximation allowance. Declaring (1) an exact inverse of +G_hat is false; a rejection test exhibits a nonzero residual. + +## Rounded local execution + +Precompute exact rational f,h from the dyadic q, then round f,1/f,h and +1/a_hat toward zero to the P-grid. Keep the old dyadic a_hat. For a completed +input b, evaluate in order + + a_hat^-1, 1/f, T(h), f, T(h)^T, 1/f, a_hat. + +Every product is exact until one completed-coordinate rounding. Signed +convolution uses four nonnegative integer products with slots strictly +wider than n times the largest integer coefficient product; it retains +only the first n coefficients. Reversal implements the upper factor. +The executable prototype performs this packing, not a dense substitute. +The bits=None path exists only for independent exact algebra tests. + +Each rounded central factor has norm below two and row perturbation at +most 5p eta. The first reciprocal step has magnitude at most +2*2^(8p+1)*B and absolute error at most 2eta B, where B=max(1,||b||). +A simple seven-step error recurrence, using a factor bound two, coefficient +row error 5p eta and one rounding unit, bounds the final rounding error by + + 2^16 p 2^(8p+1) eta B < 2^(32p) p^8 eta B. + +Combining with (4), a unit-input allowance for the inverse of the OLD A is + + LA_new = 2^(-37p) + 2^(32p) p^8 eta <=2^(-36p). (5) + +All internal records use O(p) integer guard bits and P fractional bits. +Each packed operand has O(np) bits. Applying the published unconditional +integer multiplier gives O(n p^(1+delta)) for every fixed delta>0. +A constant number of sequential local tapes and reversals adds O(np). +Setup denominators for the exact products f and h have polynomially many +bits in p. The old exact rational Schur construction still uses OLD A^-1, +and is performed once per axis as before. Nothing in (1) replaces that +precomputation with the model. Setup remains polynomial in s,p and subpolynomial in the overall input bit length +in the retained asymptotic setting. + +## Complete unchanged Schur composition and scalar error interface + +Use the original two local passes and one boundary solve: + + y_I = approx_A_inverse(b_I) + r_B = b_B - H_BI y_I + x_B = approx_S_inverse(r_B) + x_I = approx_A_inverse(b_I - H_IB x_B). + +Here S is exactly H_BB-H_BI H_II^-1 H_IB for the original H. Rounded +coupling maps and boundary solver are those of the pinned batched-boundary +construction. Its allowance is SB=2^200 p^40 eta. In the retained fixed-depth +error chain substitute LA_new for LA, giving unit-input error at most + + 1024p^2 LA_new +512p^2 SB +2048p^4 eta. (6) + +This substitution is valid because the local error is measured against +OLD A^-1, whose norm remains at most 8p. The source's completed-map bounds +and intermediate input bounds therefore still apply. No large internal +similarity factor propagates from one complete local solve to the next. +The allowance is absolute and covers both signed real components. + +For p>=101, p^2<=2^p, 10<=p and (5) bound the first term in (6) by +2^(-34p). Using 200<=2p and p^40<=2^(40p) bounds the second by +2^(44p)eta<2^(-34p); the third is also below 2^(-34p). +Consequently (6)<2^(-33p). The old H-to-N inverse perturbation is + + 32p^2 [p*2^(16p+7)eta +2^(-46p)] <2^(-42p). + +The total is below 2^(-32p)<2^(-p-10). Divide by the original 2^j, +j=ceil(log2(32p)), complete the result and round toward zero to the p-grid. +The original disk, scalar p^2 error and gamma=d(2u+j+1) interfaces survive. +The checker includes affine exponent certificates valid for every p>=101; +the elementary inequalities used above are stated explicitly rather than +inferred from a finite sample of p values. + +## Weighted factor norms: an algebraic route past huge intermediates + +There is a useful distinction between the preceding convolution evaluator +and the weighted operators themselves. Define + + W_lower=D_a T(h) D_a^-1, W_upper=D_a T(h)^T D_a^-1. + +Because diagonal matrices commute, A_tilde^-1 also equals + + D_f^-1 W_upper D_f W_lower D_f^-1. (7) + +For the exact exponential weights a, and any two coordinates in the same +phase cell separated by k>=0, the retained beta increment is theta*k. +Both endpoints lie in [-1/2,1/2). In either triangular orientation the +exponent in (a_i/a_j)*q_*^k is at most -pi*u*theta*k*(k+1): substitute +F=u*(1/4-beta^2)/theta and use the endpoint closer to the relevant cell +edge. Since q<=q_* and f_k>=14/15, each entry is bounded by + + (15/14) exp(-pi*u*theta*k*(k+1)). + +The actual downward weights obey a_hat_i<=a_i and a_hat_j>=a_j/2, +so an extra factor two covers their ratios uniformly. Sum the geometric +majorant with k*(k+1)>=2k. The elementary inequality +1/(1-exp(-x))<=1+1/x for x>0 and u*theta>=1/(4p) give + + ||W_lower||, ||W_upper|| + <= (15/7)/(1-exp(-2*pi*u*theta)) <3p. (8) + +For D=Theta(p^epsilon), fixed epsilon<1, tensoring either completed +weighted stage has norm at most (3p)^D=2^o(p); five such stages still +need only O(p) magnitude bits. This is a norm statement about (7), not +an algorithm for applying W. Directly expanding W into its three factors +reintroduces the large similarity intermediate. A fast weighted tensor +convolution with a valid precision/layout proof remains to be constructed. +The checker includes rational exponential-base phase cells verifying both +weighted orientations, their coefficientwise decay and complete identity, +and multi-axis exact identities with five tensor stages. + +## What this removes, and what it does not + +For any number of axes, the tensor of the central five factors in (1) +reorders into five tensor-factor stages, not a sum with exponentially many +branches. This is an algebraic statement only. It removes the GS branch +expansion obstacle for that specific strategy. + +Directly evaluating a tensor of the unweighted convolutions with the +combined a_hat^-1 can require O(H*u*d) guard bits for H grouped axes. +The scalar u*d<=p hypothesis does not imply H*u*d=O(p). Padding, ragged +phase-cell routing, tensor boundary corrections and an implementation that +avoids this large global similarity remain unpaid. The per-line order is +unchanged, as are the d-dependent Gaussian term and small-field exposure +row. No asymptotic kappa improvement is claimed from fewer convolutions. + +The all-size argument is a conditional written proof. Finite checks cover +classical exact identities, actual signed packed local products, 115-bit +reciprocal guards, independently rounded/truncated Gaussian sources, and +complete original-Schur solves with the new rounded local operation and +the existing rounded batched boundary/coupling operations. They use modest +work precisions and do not simulate asymptotic p or a full tape machine. + +## A checked failure of one joint-kernel implementation + +The small weighted norm in (8) does **not** justify materializing the +unweighted tensor convolution kernel on the same P-fractional-bit grid. +Here is an explicit failure of that particular proposed implementation. +It is not a lower bound for FFTs, implicit kernels, floating-point formats +with exponents, adaptive precision, or all joint weighted algorithms. + +For an integer a>=26 set + + p=2^(10a), m=2^(4a), X=2^(3a), d=u=m, D=d-1, + P=32768p, w=4X+2, k=X/2048. + +These have epsilon=r=2/5, u*d<=p, u>=ceil(log2(8p)), +(w-2)^2*u=16p and d-2>2w+k+3. Thus the retained scalar and +cell/band conditions hold eventually. The actual prime-generated axes +may be kept: their theta_i are in (1/(4d),1/(2d-1)), so u*theta_i<2. +No artificial common prime size or changed capacity hypothesis is needed. +Select a full phase cell on each axis, and its interior coordinates at +offsets w and w+k from the cell's first index. Both lie in its interior. + +Let q_i be the existing downward P-grid approximation to +q_*i=exp(-pi*u*rho_i). Its exact h_(i,k)=(-q_i)^k/f_(i,k) +satisfies |h_(i,k)|<2*q_*i^k<2^(1-3mk). The tensor kernel coefficient K +for these D displacements therefore satisfies + + |K| <2^(-D(3mk-1)) <2^-P. (9) + +Rounding K toward zero on the P-grid gives exactly zero. Reweighting this +stored zero cannot recover the corresponding weighted map entry. + +To bound the true weighted entry from below, let beta_0 be the first phase +value of a full cell; -1/2<=beta_0<-1/2+theta. At j=w+k the upper product's +exponent obeys + + (rho+2beta_j)k-theta*k^2 <=theta*k*(2w+k+3). + +Consequently the exact exponential weights give + + (a_w/a_(w+k))*q_*^k + >=exp[-pi*u*theta*k*(2w+k+3)] + >2^[-16k*(2w+k+3)]. + +The actual a_hat_w/a_hat_(w+k) is at least half the exact ratio. +Also q_*i>2^(-16m) implies q_i/q_*i>=1-delta with + delta=2^(16m+2-P)<=2^(-100p). Since Dk1/2. Finally f_(i,k)<=1. +The magnitude of the required weighted tensor entry is thus greater than + + 2^[-16Dk(2w+k+3)-D-1] >2^(-p/8) >2^-p. (10) + +A unit basis input at the selected source tensor coordinate turns this +entry into an output error. Hence the zero in (9) violates the desired +p-bit absolute accuracy. The operator itself still has the norm bound (8). + +The comparisons are uniform, not extrapolated from tested sizes. With +D>=m/2 and X>=128, the exponent in (9) divided by p is at least +3*2^a/4096-1/(2X^2)>32768. The exponent in (10) divided by p is less than + + (8+1/2048+7/128)/128 +1/128^2 <1/8. + +The remaining cell inequality follows from m/X=2^a; the corrected +exponential and reciprocal approximations use their original margins. +The required unweighted fractional exponent scales as m*D*k, +which is Theta(p^(11/10)) in this family. This is a representation cost +for this kernel materialization, not a bit-complexity lower bound on the +underlying weighted operator. + +The verifier includes these universal rational inequalities plus symbolic +rows a=26,27,32,64. Those rows do not execute their enormous tensors. +A separate finite rational example actually checks all 4,096 entries of +a 64-by-64 three-axis operator. A 14-bit unweighted grid erases 28 entries +larger than the 8-bit target error; a 30-bit grid passes the same comparison. +This small example illustrates the mechanism and does not satisfy every +asymptotic p>=101 hypothesis. The preceding argument supplies the latter. +The existing per-axis evaluator does not materialize this joint kernel +and is not contradicted by this rejection test. diff --git a/research/branchfree-gaussian-inverse/README.md b/research/branchfree-gaussian-inverse/README.md new file mode 100644 index 0000000000..421a395108 --- /dev/null +++ b/research/branchfree-gaussian-inverse/README.md @@ -0,0 +1,38 @@ +# Branch-free Gaussian interior inverse + +The retained phase-cell solver uses a difference of two convolution pairs. +This package replaces its online interior operation with two triangular +convolutions and three diagonal factors inside the existing similarity. +The identity is classical q-calculus; the contribution here is an explicit +perturbation transfer to the independently rounded, truncated source, +rounded arithmetic, and composition with the unchanged Schur system. + +The global H and exact Schur setup remain unchanged. The conditional proof +preserves the scalar precision, disk and normalization interface. It also +bounds both weighted triangular factors by 3p, identifying a useful target +for future tensor computation. A checked counterexample rejects materializing the unweighted tensor kernel +on the scalar precision grid before reweighting. This is a failure of that +implementation, not a general FFT or weighted-operator lower bound. + +A fast weighted tensor evaluator, routing, +padding and boundary composition are still missing; no new kappa or change +to the Gaussian dimension exponent is claimed. + +Run from the repository root with Python 3.11 or later, standard library only: + +```sh +python3 -B research/branchfree-gaussian-inverse/verify.py /tmp/branchfree-check +``` + +The output must not already exist. The verifier checks package and source +hashes before and after execution, then compares complete exact results +against the frozen expectation. It exercises signed integer packing, +independent rational matrix inverses, large similarity guards, complete +Gaussian/Schur operations, five-stage tensor identities and weighted decay. +The all-size argument is in [PROOF.md](PROOF.md); these bounded finite tests +are not formal verification of the complete multiplication algorithm. + +Sources are pinned to PR #486's head; the actual Gaussian/Schur code and +boundary proof are inherited from the RaD/hipotures phase-cell work and +PR #481. Classical attribution and the exact specialization appear in the +proof. No inherited source is modified. diff --git a/research/branchfree-gaussian-inverse/SOURCE.json b/research/branchfree-gaussian-inverse/SOURCE.json new file mode 100644 index 0000000000..e33309fd4a --- /dev/null +++ b/research/branchfree-gaussian-inverse/SOURCE.json @@ -0,0 +1,15 @@ +{ + "commit": "f14e5881b7681641fade599b5389995843088e20", + "files": { + "references/semantic-bulk/rad20/code/downstream_banded_inverse.py": "024770e7ba33a3739f9d5aa474687109a35e1488c3ad6486656615911ab4cbb0", + "references/semantic-bulk/rad20/code/downstream_blocked_gaussian.py": "2ca6a460a7a9718eaf50f96c1602a1f21c65e2254acb58d3a1693c7e38f1ef95", + "references/semantic-bulk/rad20/code/downstream_gaussian.py": "c666f8ccced2e25db53fc5c0332b86a544b7b84313d0b588588dd19541f1a32a", + "references/semantic-bulk/rad20/code/downstream_phase_inverse.py": "423a67c300b7c93051e0c86edfc6e1c26d342854d06571f8975bfb64181e4f6d", + "references/semantic-bulk/rad20/code/review_banded_inverse.py": "3e91715a1f185efcc5428798779064e0bf2ef892b57e7998afabed1820cd7dca", + "references/semantic-bulk/rad20/reports/downstream-phase-cell-inverse.md": "3cdf492bcb719db4295658604dc202d6a2c5a008b87de43ec54f0107c64db730", + "references/semantic-bulk/rad20/reports/review-phase-cell-inverse.md": "113927dd4fb77a55a457bd5f6da8cbfc7262d0fbc4e9d708b591a1d632e6caf6", + "research/batched-gaussian-boundary/PROOF.md": "d147cdd503e3b1830779d6810f0314b071de9cb6c5e15cfb42d80dff1079d435", + "research/batched-gaussian-boundary/code/batched.py": "a935d3e3ace1719a8bf1665445fade2e3b0c1d58bf07a1cb42c50dc4dfedae33", + "research/batched-gaussian-boundary/code/check.py": "661b7d194447339f7af420f017b008fa4717470f38c50a0da99db19e962a931d" + } +} diff --git a/research/branchfree-gaussian-inverse/code/branchfree.py b/research/branchfree-gaussian-inverse/code/branchfree.py new file mode 100644 index 0000000000..8dde7a441f --- /dev/null +++ b/research/branchfree-gaussian-inverse/code/branchfree.py @@ -0,0 +1,72 @@ +"""Two packed triangular convolutions for a rounded full-q Gaussian inverse. + +Setup uses exact rationals. Online tables and completed operations use a +fixed dyadic grid. This is a local arithmetic prototype, not a tensor solver. +""" +from fractions import Fraction as Q + + +def rounded(x, bits): + if bits is None: + return x + scale = 1 << bits + k = abs(x.numerator*scale)//x.denominator + return Q(k if x >= 0 else -k, scale) + + +def factors(q, n): + assert 0 < q <= Q(1, 4) and n > 0 + f = [Q(1)] + for j in range(1, n): + f.append(f[-1]*(1-q**(2*j))) + h = [(-q)**j/f[j] for j in range(n)] + return f, h + + +def packed_lower(h, x, bits, count): + n = len(x) + assert len(h) == n + if bits is None: + return [sum((h[i-j]*x[j] for j in range(i+1)), Q(0)) for i in range(n)] + scale = 1 << bits + hh, xx = [a*scale for a in h], [a*scale for a in x] + assert all(a.denominator == 1 for a in hh+xx) + hh, xx = [int(a) for a in hh], [int(a) for a in xx] + # Strict coefficient bound prevents any carry into the next slot. + width = max(1, (n*max(map(abs, hh))*max(map(abs, xx))).bit_length()+1) + mask = (1 << width)-1 + def pack(v, sign): + return sum(max(sign*a, 0) << (width*i) for i, a in enumerate(v)) + hp, hm, xp, xm = pack(hh, 1), pack(hh, -1), pack(xx, 1), pack(xx, -1) + products = [(hp*xp, 1), (hm*xm, 1), (hp*xm, -1), (hm*xp, -1)] + count['integer_products'] += 4 + count['convolutions'] += 1 + count['max_operand_bits'] = max(count['max_operand_bits'], *(v.bit_length() for v in (hp, hm, xp, xm))) + return [rounded(Q(sum(sign*((v >> (width*i)) & mask) for v, sign in products), scale*scale), bits) + for i in range(n)] + + +def prepare(q, weights, bits): + f, h = factors(q, len(weights)) + assert all(a > 0 for a in weights) + r = lambda xs: [rounded(x, bits) for x in xs] + return dict(f=r(f), invf=r([1/x for x in f]), h=r(h), + weights=list(weights), inva=r([1/x for x in weights]), bits=bits) + + +def apply(table, b, count): + bits = table['bits'] + def diagonal(d, x): + count['diagonal_products'] += len(x) + return [rounded(a*y, bits) for a, y in zip(d, x)] + x = diagonal(table['inva'], b) + x = diagonal(table['invf'], x) + x = packed_lower(table['h'], x, bits, count) + x = diagonal(table['f'], x) + x = list(reversed(packed_lower(table['h'], list(reversed(x)), bits, count))) + x = diagonal(table['invf'], x) + return diagonal(table['weights'], x) + + +def counter(): + return dict(convolutions=0, integer_products=0, diagonal_products=0, max_operand_bits=0) diff --git a/research/branchfree-gaussian-inverse/code/check.py b/research/branchfree-gaussian-inverse/code/check.py new file mode 100644 index 0000000000..bdc1487628 --- /dev/null +++ b/research/branchfree-gaussian-inverse/code/check.py @@ -0,0 +1,277 @@ +"""Independent identities, rounded source transfer and complete Schur solves.""" +from copy import deepcopy +from fractions import Fraction as Q +import importlib.util +from pathlib import Path +import sys +from branchfree import apply, counter, factors, packed_lower, prepare, rounded +from precision_guard import run as precision_guard + +REPO = Path(__file__).resolve().parents[3] +sys.path.insert(0, str(REPO/'references/semantic-bulk/rad20/code')) +sys.path.insert(0, str(REPO/'research/batched-gaussian-boundary/code')) +from review_banded_inverse import inverse, multiply, norm +from batched import compile_coupling, coupling, grid, prepare as boundary_prepare, solve, counter as boundary_counter +spec = importlib.util.spec_from_file_location('boundary_checks', REPO/'research/batched-gaussian-boundary/code/check.py') +boundary_checks = importlib.util.module_from_spec(spec) +spec.loader.exec_module(boundary_checks) + + +def transpose(a): + return list(map(list, zip(*a))) + + +def diff(a, b): + return [[x-y for x, y in zip(ar, br)] for ar, br in zip(a, b)] + + +def maxentry(a): + return max((abs(x) for row in a for x in row), default=Q(0)) + + +def outward(x, bits=160): + scaled = x*(1 << bits) + return str(Q(-(-scaled.numerator//scaled.denominator), 1 << bits)) + + +def gaussian(q, n, weights=None, cutoff=None): + weights = weights or [Q(1)]*n + return [[weights[i]*q**((i-j)**2)/weights[j] if cutoff is None or abs(i-j) <= cutoff else Q(0) + for j in range(n)] for i in range(n)] + + +def operator(table): + n = len(table['f']) + return transpose([apply(table, [Q(i == j) for i in range(n)], counter()) for j in range(n)]) + + +def identities(): + rows = [] + for n in range(1, 13): + for q in (Q(1, 4), Q(1, 16), Q(1, 256)): + f, h = factors(q, n) + low = [[q**((i-j)**2)*f[i]/(f[j]*f[i-j]) if i >= j else Q(0) + for j in range(n)] for i in range(n)] + lf = [[v*f[j] for j, v in enumerate(row)] for row in low] + g = gaussian(q, n) + assert multiply(lf, transpose(low)) == g + got = operator(prepare(q, [Q(1)]*n, None)) + assert multiply(g, got) == [[Q(i == j) for j in range(n)] for i in range(n)] + assert got == inverse(g) + assert min(f) >= Q(14, 15) and sum(map(abs, h)) <= Q(10, 7) + rows.append(dict(n=n, q=str(q), ldl_entries=n*n, inverse_entries=n*n)) + return rows + + +def rounded_cases(): + rows = [] + for n in (3, 8, 17, 24): + for direction in (1, -1): + # A large similarity guard tests absolute, not relative, error. + weights = [Q(1, 1 << (5*(i if direction == 1 else n-1-i))) for i in range(n)] + q, bits = Q(1, 256), 384 + table = prepare(q, weights, bits) + probes = [[Q(i == j) for i in range(n)] for j in range(n)] + probes += [[Q((13*i)%19-9, 8) for i in range(n)], [Q(1)]*n] + ref = inverse(gaussian(q, n, weights)) + count = counter() + got = transpose([apply(table, v, count) for v in probes]) + exact = multiply(ref, transpose(probes)) + error = maxentry(diff(got, exact)) + assert error < Q(1, 1 << 200) + assert count['convolutions'] == 2*len(probes) + assert count['integer_products'] == 8*len(probes) + # Independently check packing for signed coefficients/data. + x = probes[-2] + h = table['h'] + packed = packed_lower(h, x, bits, counter()) + dense = [rounded(sum((h[i-j]*x[j] for j in range(i+1)), Q(0)), bits) for i in range(n)] + assert packed == dense + rows.append(dict(n=n, direction=direction, reciprocal_guard_bits=5*(n-1), + work_bits=bits, probes=len(probes), entries=n*len(probes), + error_upper=outward(error, 240), counts=count)) + return rows + + +def tensor_and_weighted(): + """Exact algebra/conditioning only; no fast weighted tensor evaluator.""" + def kron(a, b): + return [[x*y for x in ar for y in br] for ar in a for br in b] + def diagonal(v): + return [[x if i == j else Q(0) for j in range(len(v))] for i, x in enumerate(v)] + tensors = [] + for shape in ((2, 3), (3, 4), (2, 3, 4)): + stages = [[[Q(1)]] for _ in range(5)] + expected = [[Q(1)]] + for axis, n in enumerate(shape): + q = Q(1, 4**(axis+1)) + f, h = factors(q, n) + th = [[h[i-j] if i >= j else Q(0) for j in range(n)] for i in range(n)] + fs = (diagonal([1/x for x in f]), transpose(th), diagonal(f), th, diagonal([1/x for x in f])) + stages = [kron(old, new) for old, new in zip(stages, fs)] + expected = kron(expected, inverse(gaussian(q, n))) + got = stages[0] + for stage in stages[1:]: + got = multiply(got, stage) + assert got == expected + tensors.append(dict(shape=list(shape), stages=5, entries=len(got)**2)) + weighted = [] + for m in (4, 8, 16): + for base in (Q(1, 2), Q(3, 4), Q(7, 8)): + q = base**(m+1) + if q > Q(1, 4): + continue + # theta=1/m, beta=j/m-1/2 and base=exp(-pi*u*theta). + weights = [base**(j*(m-j)) for j in range(m)] + f, h = factors(q, m) + lower = [[weights[i]*h[i-j]/weights[j] if i >= j else Q(0) for j in range(m)] for i in range(m)] + upper = [[weights[i]*h[j-i]/weights[j] if j >= i else Q(0) for j in range(m)] for i in range(m)] + bound = Q(15, 14)/(1-base*base) + assert norm(lower) <= bound and norm(upper) <= bound + for a in (lower, upper): + assert all(abs(a[i][j]) <= Q(15,14)*base**(abs(i-j)*(abs(i-j)+1)) + for i in range(m) for j in range(m)) + invf = diagonal([1/x for x in f]) + got = multiply(multiply(multiply(multiply(invf, upper), diagonal(f)), lower), invf) + assert got == inverse(gaussian(q, m, weights)) + weighted.append(dict(n=m, base=str(base), entries=2*m*m, norm_upper=outward(bound), + maximum_measured_norm=outward(max(norm(lower), norm(upper))))) + return dict(tensor_identities=tensors, weighted_factors=weighted, + scope='exact identities and norm bounds, no fast joint evaluator') + + +def complete_case(s, t, u, w, bits=256): + from downstream_banded_inverse import nearest_data + from downstream_blocked_gaussian import gaussian_interval, pi_interval + schur, ctx = boundary_checks.gaussian_schur(s, t, u, w, bits) + rho, beta = nearest_data(s, t) + pi = pi_interval(bits+64) + def lower(f): + lo, hi = gaussian_interval(f, pi, bits+24) + assert hi-lo < Q(1, 1 << bits) + return rounded(lo, bits) + weights = [lower(u*(Q(1, 4)-b*b)/(rho-1)) for b in beta] + q = lower(u*rho) + groups = [[j for j, i in enumerate(ctx['interior']) if i in cell] for cell in ctx['cells']] + tables, models, local_rows = [], [], [] + for group in groups: + physical = [ctx['interior'][j] for j in group] + aw = [weights[i] for i in physical] + table = prepare(q, aw, bits) + model = gaussian(q, len(group), aw) + source = [[ctx['a'][i][j] for j in physical] for i in physical] + # Source is independently rounded AND truncated. It is not the model. + perturb = norm(diff(model, source)) + assert perturb > 0 + ka = max(aw)/min(aw) + n = len(group) + tail = 2*q**((w+1)**2)/(1-q**(2*w+3)) + perturb_bound = ka*(8*n*(n*n+1)*Q(1, 1 << bits)+tail) + assert perturb <= perturb_bound + old_inv, new_inv = inverse(source), inverse(model) + measured = norm(diff(old_inv, new_inv)) + resolvent = norm(old_inv)*norm(new_inv)*perturb + assert measured <= resolvent + rounded_op = operator(table) + round_error = norm(diff(rounded_op, new_inv)) + assert round_error < Q(1, 1 << 120) + tables.append(table) + models.append(model) + local_rows.append(dict(n=n, perturbation_upper=outward(perturb), + perturbation_bound=outward(perturb_bound), + inverse_difference_upper=outward(measured), + resolvent_upper=outward(resolvent), + rounded_operator_error_upper=outward(round_error), + changed_source=True)) + rhs = [[Q(i == j) for j in range(s)]+[Q((i*11)%17-8, 8), Q(1)] for i in range(s)] + bi, bb = [rhs[i] for i in ctx['interior']], [rhs[i] for i in ctx['boundary']] + bc, lc = boundary_counter(), counter() + def local(b): + out = [[Q(0)]*len(b[0]) for _ in b] + for group, table in zip(groups, tables): + x = transpose([apply(table, col, lc) for col in zip(*(b[i] for i in group))]) + for i, row in zip(group, x): + out[i] = row + return out + width = 2*w + h = 1 << (width-1).bit_length() + bg = [[j for j, i in enumerate(ctx['boundary']) if i in cell] for cell in ctx['cells']] + bp = compile_coupling(ctx['bi'], bg, groups, h, bits) + ip = compile_coupling(ctx['ib'], groups, bg, h, bits) + y = local(bi) + rb = grid(diff(bb, coupling(bp, y, bc)), bits) + xb = solve(boundary_prepare(schur, width, bits), rb, bc) + xi = local(grid(diff(bi, coupling(ip, xb, bc)), bits)) + got = [[Q(0)]*len(rhs[0]) for _ in range(s)] + for i, row in zip(ctx['interior'], xi): + got[i] = row + for i, row in zip(ctx['boundary'], xb): + got[i] = row + exact = multiply(inverse(ctx['a']), rhs) + error = maxentry(diff(got, exact)) + residual = maxentry(diff(multiply(ctx['a'], got), rhs)) + assert error <= residual/boundary_checks.gap(ctx['a']) + assert error < Q(1, 1 << 24) + # No changed global H or Schur complement is used anywhere above. + return dict(shape=[s, t, u, w], local_cells=local_rows, rhs=len(rhs[0]), + entries=s*len(rhs[0]), error_upper=outward(error), residual_upper=outward(residual), + local_counts=lc, boundary_counts=bc, global_matrix='unchanged truncated H', + schur='exactly the original H Schur, rounded by the pinned solver') + + +def mutants(): + n, q, bits = 8, Q(1, 4), 192 + weights = [Q(1, 1 << i) for i in range(n)] + base = prepare(q, weights, bits) + exact = inverse(gaussian(q, n, weights)) + rows = [] + for name in ('drop-middle-f', 'reverse-h', 'drop-signs', 'omit-weight-reciprocal'): + bad = deepcopy(base) + if name == 'drop-middle-f': bad['f'] = [Q(1)]*n + if name == 'reverse-h': bad['h'].reverse() + if name == 'drop-signs': bad['h'] = list(map(abs, bad['h'])) + if name == 'omit-weight-reciprocal': bad['inva'] = [Q(1)]*n + error = norm(diff(operator(bad), exact)) + assert error > Q(1, 1 << 16) + rows.append(dict(name=name, discrepancy_lower='1/65536')) + # The tempting exact-substitution assertion is demonstrably false. + truncated = gaussian(q, n, weights, cutoff=1) + residual = norm(diff(multiply(truncated, operator(prepare(q, weights, None))), + [[Q(i == j) for j in range(n)] for i in range(n)])) + assert residual > Q(1, 1 << 16) + rows.append(dict(name='declare-truncated-source-inverse-exact', discrepancy_lower='1/65536')) + return rows + + +def uniform_bounds(): + # Affine exponent differences: slope >= 0 and positive at p=101 proves all p>=101. + # p^2<=2^p (p>=4), p^k<=2^(kp), and 200<=2p are stated in PROOF.md. + rows = [ + ('rounded-source term below 2^-40p', 32768-8-3-40, -12), + ('tail below half 2^-39p', 1, -4), + ('resolvent smallness 8p*2^-39p<1/2', 38, -4), + ('inverse perturbation <=2^-37p', 1, -7), + ('rounded local <=2^-37p', 32768-32-8-37, 0), + ('composition local <=2^-34p', 1, -10), + ('boundary composition <=2^-34p', 32768-44-34, 0), + ('final 2^-32p below 2^-p-10', 31, -10), + ] + for _, slope, intercept in rows: + assert slope >= 0 and slope*101+intercept > 0 + return [dict(name=name, slope=slope, intercept=intercept, + gap_at_p101=slope*101+intercept) for name, slope, intercept in rows] + + +def run(): + return dict(identities=identities(), rounded=rounded_cases(), + tensor_and_weighted=tensor_and_weighted(), + tensor_precision_guard=precision_guard(), + complete_schur=[complete_case(*x) for x in ((24,26,4,1),(48,50,4,2))], + rejected_mutants=mutants(), uniform_bounds=uniform_bounds(), + kappa_claim=None, + scope='local branch-free replacement and retained Schur error transfer; no joint-axis evaluator') + + +if __name__ == '__main__': + import json + print(json.dumps(run(), indent=2, sort_keys=True)) diff --git a/research/branchfree-gaussian-inverse/code/precision_guard.py b/research/branchfree-gaussian-inverse/code/precision_guard.py new file mode 100644 index 0000000000..2bf0e3d5e8 --- /dev/null +++ b/research/branchfree-gaussian-inverse/code/precision_guard.py @@ -0,0 +1,75 @@ +"""Reject materializing the unweighted tensor kernel on the scalar P-grid. + +The dense toy really checks its full 64-by-64 operator. The enormous legal +parameter rows are symbolic exponent certificates, not tensor executions. +""" +from fractions import Fraction as Q +from itertools import product +from math import prod +from branchfree import factors, rounded + + +def run(): + n, dimensions, bits, target = 4, 3, 14, 8 + q = Q(1, 1 << (n+1)) + weights = [Q(1, 1 << (j*(n-j))) for j in range(n)] + _, h = factors(q, n) + labels = list(product(range(n), repeat=dimensions)) + errors = {} + erased = 0 + for work in (bits, 30): + maxrow = Q(0) + for i in labels: + row = Q(0) + for j in labels: + kernel = prod((h[b-a] for a, b in zip(i, j)), start=Q(1)) if all(a <= b for a, b in zip(i, j)) else Q(0) + ratio = prod((weights[a]/weights[b] for a, b in zip(i, j)), start=Q(1)) + got = rounded(kernel, work)*ratio + exact = kernel*ratio + row += abs(got-exact) + if work == bits and got == 0 and abs(exact) > Q(1, 1 << target): + erased += 1 + maxrow = max(maxrow, row) + errors[str(work)] = str(maxrow) + assert Q(errors[str(bits)]) > Q(1, 1 << target) + assert erased > 0 + assert Q(errors['30']) < Q(1, 1 << target) + guard = (max(weights)/min(weights))**dimensions + assert len(labels)*guard*Q(1, 1 << 30) < Q(1, 1 << target) + + # Universal bounds in the appendix use X=2^(3a)>=128 and a>=26. + weighted_ratio_bound = (Q(8)+Q(1,2048)+Q(7,128))/128+Q(1,128**2) + assert weighted_ratio_bound < Q(1,8) + assert Q(3*2**26,4096)-Q(1,2) > 32768 + assert 2**26 > 8+Q(1,2048)+9 + rows = [] + for a in (26,27,32,64): + m, x, p = 1 << (4*a), 1 << (3*a), 1 << (10*a) + d, u = m, m + dimensions = d-1 + w, k, work = 4*x+2, x//2048, 32768*p + unweighted_exponent = dimensions*(3*m*k-1) + weighted_exponent = 16*dimensions*k*(2*w+k+3)+dimensions+1 + assert unweighted_exponent > work + assert weighted_exponent < p//8 + assert d-2 > 2*w+k+3 and u*d <= p + assert u >= 3+10*a + assert (w-2)**2*u == 16*p + assert dimensions*k < p + assert work-16*m-2 >= 100*p + assert dimensions*(3*p).bit_length() < p + rows.append(dict(a=a, log2_p=10*a, log2_u=4*a, log2_d=4*a, + work_precision_ratio=32768, + unweighted_exponent_over_work=str(Q(unweighted_exponent,work)), + weighted_exponent_over_p=str(Q(weighted_exponent,p)), + scope='symbolic parameter inequalities only; no payload tensor executed')) + return dict(dense_toy=dict(shape=[n]*3, operator_entries=len(labels)**2, + scalar_target_bits=target, failed_work_bits=bits, + accepted_work_bits=30, erased_significant_entries=erased, + operator_error_by_precision=errors, + scope='small rational geometry; not the asymptotic p>=101 setting'), + symbolic_rows=rows, + uniform_weighted_ratio_bound=str(weighted_ratio_bound), + claim='P-grid materialization of the unweighted tensor kernel can fail after reweighting', + excluded_claims=['no FFT lower bound','no barrier for implicit or adaptive-precision kernels', + 'no counterexample to the per-axis evaluator']) diff --git a/research/branchfree-gaussian-inverse/verify.py b/research/branchfree-gaussian-inverse/verify.py new file mode 100644 index 0000000000..d9a0bd3208 --- /dev/null +++ b/research/branchfree-gaussian-inverse/verify.py @@ -0,0 +1,58 @@ +#!/usr/bin/env python3 +"""Source-bound exact controls for a branch-free Gaussian interior inverse.""" +import argparse +import hashlib +import json +from pathlib import Path +import sys + +assert __debug__, 'verification requires assertions' +ROOT = Path(__file__).resolve().parent +REPO = ROOT.parents[1] +sys.path.insert(0, str(ROOT/'code')) +read = lambda p: json.loads(p.read_text()) +sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest() + + +def integrity(): + actual = {p.relative_to(ROOT).as_posix(): sha(p) for p in ROOT.rglob('*') + if p.is_file() and p.name != 'MANIFEST.json' and '__pycache__' not in p.parts} + assert actual == read(ROOT/'MANIFEST.json') + for name, digest in read(ROOT/'SOURCE.json')['files'].items(): + assert sha(REPO/name) == digest, name + + +def main(): + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('output', type=Path) + out = ap.parse_args().output.resolve() + assert not out.exists() and not out.is_relative_to(ROOT) + integrity() + from check import run + checked = run() + assert checked == read(ROOT/'EXPECTED.json') + summary = dict(exact_cases=len(checked['identities']), + exact_ldl_entries=sum(x['ldl_entries'] for x in checked['identities']), + exact_inverse_entries=sum(x['inverse_entries'] for x in checked['identities']), + rounded_cases=len(checked['rounded']), + rounded_entries=sum(x['entries'] for x in checked['rounded']), + full_schur_cases=len(checked['complete_schur']), + full_schur_entries=sum(x['entries'] for x in checked['complete_schur']), + tensor_entries=sum(x['entries'] for x in checked['tensor_and_weighted']['tensor_identities']), + weighted_factor_entries=sum(x['entries'] for x in checked['tensor_and_weighted']['weighted_factors']), + joint_kernel_guard_entries=checked['tensor_precision_guard']['dense_toy']['operator_entries'], + joint_kernel_symbolic_rows=len(checked['tensor_precision_guard']['symbolic_rows']), + mutants=len(checked['rejected_mutants']), scope=checked['scope'], kappa_claim=None) + integrity() + out.mkdir(parents=True) + for name, value in [('CHECKS', checked), ('RESULT', summary)]: + (out/(name+'.json')).write_text(json.dumps(value, indent=2, sort_keys=True)+'\n') + receipt = dict(status='PASS_BRANCHFREE_GAUSSIAN_INVERSE', python=sys.version.split()[0], + manifest_sha256=sha(ROOT/'MANIFEST.json'), source_sha256=sha(ROOT/'SOURCE.json'), + checks_sha256=sha(out/'CHECKS.json'), result_sha256=sha(out/'RESULT.json')) + (out/'RECEIPT.json').write_text(json.dumps(receipt, indent=2, sort_keys=True)+'\n') + print(json.dumps(receipt, indent=2)) + + +if __name__ == '__main__': + main() diff --git a/research/complementary-fft-reservoirs-validation/CAPACITY.json b/research/complementary-fft-reservoirs-validation/CAPACITY.json new file mode 100644 index 0000000000..ae7dc4f75c --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/CAPACITY.json @@ -0,0 +1,9887 @@ +{ + "layouts": [ + { + "G": 202, + "K": 12928, + "W": 10178, + "active": 32767, + "address_bits": 847236480, + "d": 65536, + "intervals": { + "active": [ + 410386432, + 833998208 + ], + "back": [ + 833998208, + 847236480 + ], + "back_spectator": [ + 847236480, + 847236480 + ], + "front0": [ + 542976, + 13781248 + ], + "front1": [ + 13781248, + 27019520 + ], + "front_spectator": [ + 27019520, + 410386432 + ], + "row": [ + 0, + 542976 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 202, + "K": 12928, + "W": 10178, + "active": 32768, + "address_bits": 847236480, + "d": 65536, + "intervals": { + "active": [ + 410373504, + 833998208 + ], + "back": [ + 833998208, + 847236480 + ], + "back_spectator": [ + 847236480, + 847236480 + ], + "front0": [ + 542976, + 13781248 + ], + "front1": [ + 13781248, + 27019520 + ], + "front_spectator": [ + 27019520, + 410373504 + ], + "row": [ + 0, + 542976 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 202, + "K": 12929, + "W": 10178, + "active": 32767, + "address_bits": 847302015, + "d": 65536, + "intervals": { + "active": [ + 410418176, + 834062719 + ], + "back": [ + 834062719, + 847300991 + ], + "back_spectator": [ + 847300991, + 847302015 + ], + "front0": [ + 543018, + 13781290 + ], + "front1": [ + 13781290, + 27019562 + ], + "front_spectator": [ + 27019562, + 410418176 + ], + "row": [ + 0, + 543018 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 202, + "K": 12929, + "W": 10178, + "active": 32768, + "address_bits": 847302015, + "d": 65536, + "intervals": { + "active": [ + 410405247, + 834062719 + ], + "back": [ + 834062719, + 847300991 + ], + "back_spectator": [ + 847300991, + 847302015 + ], + "front0": [ + 543018, + 13781290 + ], + "front1": [ + 13781290, + 27019562 + ], + "front_spectator": [ + 27019562, + 410405247 + ], + "row": [ + 0, + 543018 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 202, + "K": 25855, + "W": 10178, + "active": 32767, + "address_bits": 1694407425, + "d": 65536, + "intervals": { + "active": [ + 833953025, + 1681143810 + ], + "back": [ + 1681143810, + 1694382082 + ], + "back_spectator": [ + 1694382082, + 1694407425 + ], + "front0": [ + 1085910, + 14324182 + ], + "front1": [ + 14324182, + 27562454 + ], + "front_spectator": [ + 27562454, + 833953025 + ], + "row": [ + 0, + 1085910 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 202, + "K": 25855, + "W": 10178, + "active": 32768, + "address_bits": 1694407425, + "d": 65536, + "intervals": { + "active": [ + 833927170, + 1681143810 + ], + "back": [ + 1681143810, + 1694382082 + ], + "back_spectator": [ + 1694382082, + 1694407425 + ], + "front0": [ + 1085910, + 14324182 + ], + "front1": [ + 14324182, + 27562454 + ], + "front_spectator": [ + 27562454, + 833927170 + ], + "row": [ + 0, + 1085910 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 202, + "K": 12928, + "W": 10178, + "active": 131071, + "address_bits": 3388984704, + "d": 262144, + "intervals": { + "active": [ + 1641545728, + 3336031616 + ], + "back": [ + 3336031616, + 3388984704 + ], + "back_spectator": [ + 3388984704, + 3388984704 + ], + "front0": [ + 542976, + 53496064 + ], + "front1": [ + 53496064, + 106449152 + ], + "front_spectator": [ + 106449152, + 1641545728 + ], + "row": [ + 0, + 542976 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 202, + "K": 12928, + "W": 10178, + "active": 131072, + "address_bits": 3388984704, + "d": 262144, + "intervals": { + "active": [ + 1641532800, + 3336031616 + ], + "back": [ + 3336031616, + 3388984704 + ], + "back_spectator": [ + 3388984704, + 3388984704 + ], + "front0": [ + 542976, + 53496064 + ], + "front1": [ + 53496064, + 106449152 + ], + "front_spectator": [ + 106449152, + 1641532800 + ], + "row": [ + 0, + 542976 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 202, + "K": 12929, + "W": 10178, + "active": 131071, + "address_bits": 3389246847, + "d": 262144, + "intervals": { + "active": [ + 1641672704, + 3336289663 + ], + "back": [ + 3336289663, + 3389242751 + ], + "back_spectator": [ + 3389242751, + 3389246847 + ], + "front0": [ + 543018, + 53496106 + ], + "front1": [ + 53496106, + 106449194 + ], + "front_spectator": [ + 106449194, + 1641672704 + ], + "row": [ + 0, + 543018 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 202, + "K": 12929, + "W": 10178, + "active": 131072, + "address_bits": 3389246847, + "d": 262144, + "intervals": { + "active": [ + 1641659775, + 3336289663 + ], + "back": [ + 3336289663, + 3389242751 + ], + "back_spectator": [ + 3389242751, + 3389246847 + ], + "front0": [ + 543018, + 53496106 + ], + "front1": [ + 53496106, + 106449194 + ], + "front_spectator": [ + 106449194, + 1641659775 + ], + "row": [ + 0, + 543018 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 202, + "K": 25855, + "W": 10178, + "active": 131071, + "address_bits": 6777707265, + "d": 262144, + "intervals": { + "active": [ + 3335889665, + 6724730370 + ], + "back": [ + 6724730370, + 6777683458 + ], + "back_spectator": [ + 6777683458, + 6777707265 + ], + "front0": [ + 1085910, + 54038998 + ], + "front1": [ + 54038998, + 106992086 + ], + "front_spectator": [ + 106992086, + 3335889665 + ], + "row": [ + 0, + 1085910 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 202, + "K": 25855, + "W": 10178, + "active": 131072, + "address_bits": 6777707265, + "d": 262144, + "intervals": { + "active": [ + 3335863810, + 6724730370 + ], + "back": [ + 6724730370, + 6777683458 + ], + "back_spectator": [ + 6777683458, + 6777707265 + ], + "front0": [ + 1085910, + 54038998 + ], + "front1": [ + 54038998, + 106992086 + ], + "front_spectator": [ + 106992086, + 3335863810 + ], + "row": [ + 0, + 1085910 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 202, + "K": 12928, + "W": 10178, + "active": 524287, + "address_bits": 13555977600, + "d": 1048576, + "intervals": { + "active": [ + 6566182912, + 13344165248 + ], + "back": [ + 13344165248, + 13555977600 + ], + "back_spectator": [ + 13555977600, + 13555977600 + ], + "front0": [ + 723968, + 212536320 + ], + "front1": [ + 212536320, + 424348672 + ], + "front_spectator": [ + 424348672, + 6566182912 + ], + "row": [ + 0, + 723968 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 202, + "K": 12928, + "W": 10178, + "active": 524288, + "address_bits": 13555977600, + "d": 1048576, + "intervals": { + "active": [ + 6566169984, + 13344165248 + ], + "back": [ + 13344165248, + 13555977600 + ], + "back_spectator": [ + 13555977600, + 13555977600 + ], + "front0": [ + 723968, + 212536320 + ], + "front1": [ + 212536320, + 424348672 + ], + "front_spectator": [ + 424348672, + 6566169984 + ], + "row": [ + 0, + 723968 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 202, + "K": 12929, + "W": 10178, + "active": 524287, + "address_bits": 13557026175, + "d": 1048576, + "intervals": { + "active": [ + 6566703745, + 13345210368 + ], + "back": [ + 13345210368, + 13557022720 + ], + "back_spectator": [ + 13557022720, + 13557026175 + ], + "front0": [ + 724024, + 212536376 + ], + "front1": [ + 212536376, + 424348728 + ], + "front_spectator": [ + 424348728, + 6566703745 + ], + "row": [ + 0, + 724024 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16383, + "qF": 32766 + }, + { + "G": 202, + "K": 12929, + "W": 10178, + "active": 524288, + "address_bits": 13557026175, + "d": 1048576, + "intervals": { + "active": [ + 6566690816, + 13345210368 + ], + "back": [ + 13345210368, + 13557022720 + ], + "back_spectator": [ + 13557022720, + 13557026175 + ], + "front0": [ + 724024, + 212536376 + ], + "front1": [ + 212536376, + 424348728 + ], + "front_spectator": [ + 424348728, + 6566690816 + ], + "row": [ + 0, + 724024 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16383, + "qF": 32766 + }, + { + "G": 202, + "K": 25855, + "W": 10178, + "active": 524287, + "address_bits": 27110906625, + "d": 1048576, + "intervals": { + "active": [ + 13343636225, + 26899076610 + ], + "back": [ + 26899076610, + 27110888962 + ], + "back_spectator": [ + 27110888962, + 27110906625 + ], + "front0": [ + 1447880, + 213260232 + ], + "front1": [ + 213260232, + 425072584 + ], + "front_spectator": [ + 425072584, + 13343636225 + ], + "row": [ + 0, + 1447880 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 202, + "K": 25855, + "W": 10178, + "active": 524288, + "address_bits": 27110906625, + "d": 1048576, + "intervals": { + "active": [ + 13343610370, + 26899076610 + ], + "back": [ + 26899076610, + 27110888962 + ], + "back_spectator": [ + 27110888962, + 27110906625 + ], + "front0": [ + 1447880, + 213260232 + ], + "front1": [ + 213260232, + 425072584 + ], + "front_spectator": [ + 425072584, + 13343610370 + ], + "row": [ + 0, + 1447880 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 266, + "K": 17024, + "W": 10178, + "active": 32767, + "address_bits": 1115667840, + "d": 65536, + "intervals": { + "active": [ + 540409856, + 1098235264 + ], + "back": [ + 1098235264, + 1115667840 + ], + "back_spectator": [ + 1115667840, + 1115667840 + ], + "front0": [ + 715008, + 18147584 + ], + "front1": [ + 18147584, + 35580160 + ], + "front_spectator": [ + 35580160, + 540409856 + ], + "row": [ + 0, + 715008 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 266, + "K": 17024, + "W": 10178, + "active": 32768, + "address_bits": 1115667840, + "d": 65536, + "intervals": { + "active": [ + 540392832, + 1098235264 + ], + "back": [ + 1098235264, + 1115667840 + ], + "back_spectator": [ + 1115667840, + 1115667840 + ], + "front0": [ + 715008, + 18147584 + ], + "front1": [ + 18147584, + 35580160 + ], + "front_spectator": [ + 35580160, + 540392832 + ], + "row": [ + 0, + 715008 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 266, + "K": 17025, + "W": 10178, + "active": 32767, + "address_bits": 1115733375, + "d": 65536, + "intervals": { + "active": [ + 540441600, + 1098299775 + ], + "back": [ + 1098299775, + 1115732351 + ], + "back_spectator": [ + 1115732351, + 1115733375 + ], + "front0": [ + 715050, + 18147626 + ], + "front1": [ + 18147626, + 35580202 + ], + "front_spectator": [ + 35580202, + 540441600 + ], + "row": [ + 0, + 715050 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 266, + "K": 17025, + "W": 10178, + "active": 32768, + "address_bits": 1115733375, + "d": 65536, + "intervals": { + "active": [ + 540424575, + 1098299775 + ], + "back": [ + 1098299775, + 1115732351 + ], + "back_spectator": [ + 1115732351, + 1115733375 + ], + "front0": [ + 715050, + 18147626 + ], + "front1": [ + 18147626, + 35580202 + ], + "front_spectator": [ + 35580202, + 540424575 + ], + "row": [ + 0, + 715050 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 266, + "K": 34047, + "W": 10178, + "active": 32767, + "address_bits": 2231270145, + "d": 65536, + "intervals": { + "active": [ + 1098185985, + 2213804034 + ], + "back": [ + 2213804034, + 2231236610 + ], + "back_spectator": [ + 2231236610, + 2231270145 + ], + "front0": [ + 1429974, + 18862550 + ], + "front1": [ + 18862550, + 36295126 + ], + "front_spectator": [ + 36295126, + 1098185985 + ], + "row": [ + 0, + 1429974 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 266, + "K": 34047, + "W": 10178, + "active": 32768, + "address_bits": 2231270145, + "d": 65536, + "intervals": { + "active": [ + 1098151938, + 2213804034 + ], + "back": [ + 2213804034, + 2231236610 + ], + "back_spectator": [ + 2231236610, + 2231270145 + ], + "front0": [ + 1429974, + 18862550 + ], + "front1": [ + 18862550, + 36295126 + ], + "front_spectator": [ + 36295126, + 1098151938 + ], + "row": [ + 0, + 1429974 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 266, + "K": 17024, + "W": 10178, + "active": 131071, + "address_bits": 4462722432, + "d": 262144, + "intervals": { + "active": [ + 2161639424, + 4392992128 + ], + "back": [ + 4392992128, + 4462722432 + ], + "back_spectator": [ + 4462722432, + 4462722432 + ], + "front0": [ + 715008, + 70445312 + ], + "front1": [ + 70445312, + 140175616 + ], + "front_spectator": [ + 140175616, + 2161639424 + ], + "row": [ + 0, + 715008 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 266, + "K": 17024, + "W": 10178, + "active": 131072, + "address_bits": 4462722432, + "d": 262144, + "intervals": { + "active": [ + 2161622400, + 4392992128 + ], + "back": [ + 4392992128, + 4462722432 + ], + "back_spectator": [ + 4462722432, + 4462722432 + ], + "front0": [ + 715008, + 70445312 + ], + "front1": [ + 70445312, + 140175616 + ], + "front_spectator": [ + 140175616, + 2161622400 + ], + "row": [ + 0, + 715008 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 266, + "K": 17025, + "W": 10178, + "active": 131071, + "address_bits": 4462984575, + "d": 262144, + "intervals": { + "active": [ + 2161766400, + 4393250175 + ], + "back": [ + 4393250175, + 4462980479 + ], + "back_spectator": [ + 4462980479, + 4462984575 + ], + "front0": [ + 715050, + 70445354 + ], + "front1": [ + 70445354, + 140175658 + ], + "front_spectator": [ + 140175658, + 2161766400 + ], + "row": [ + 0, + 715050 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 266, + "K": 17025, + "W": 10178, + "active": 131072, + "address_bits": 4462984575, + "d": 262144, + "intervals": { + "active": [ + 2161749375, + 4393250175 + ], + "back": [ + 4393250175, + 4462980479 + ], + "back_spectator": [ + 4462980479, + 4462984575 + ], + "front0": [ + 715050, + 70445354 + ], + "front1": [ + 70445354, + 140175658 + ], + "front_spectator": [ + 140175658, + 2161749375 + ], + "row": [ + 0, + 715050 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 266, + "K": 34047, + "W": 10178, + "active": 131071, + "address_bits": 8925182721, + "d": 262144, + "intervals": { + "active": [ + 4392846081, + 8855420418 + ], + "back": [ + 8855420418, + 8925150722 + ], + "back_spectator": [ + 8925150722, + 8925182721 + ], + "front0": [ + 1429974, + 71160278 + ], + "front1": [ + 71160278, + 140890582 + ], + "front_spectator": [ + 140890582, + 4392846081 + ], + "row": [ + 0, + 1429974 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 266, + "K": 34047, + "W": 10178, + "active": 131072, + "address_bits": 8925182721, + "d": 262144, + "intervals": { + "active": [ + 4392812034, + 8855420418 + ], + "back": [ + 8855420418, + 8925150722 + ], + "back_spectator": [ + 8925150722, + 8925182721 + ], + "front0": [ + 1429974, + 71160278 + ], + "front1": [ + 71160278, + 140890582 + ], + "front_spectator": [ + 140890582, + 4392812034 + ], + "row": [ + 0, + 1429974 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 266, + "K": 17024, + "W": 10178, + "active": 524287, + "address_bits": 17850940800, + "d": 1048576, + "intervals": { + "active": [ + 8646557696, + 17572019584 + ], + "back": [ + 17572019584, + 17850940800 + ], + "back_spectator": [ + 17850940800, + 17850940800 + ], + "front0": [ + 953344, + 279874560 + ], + "front1": [ + 279874560, + 558795776 + ], + "front_spectator": [ + 558795776, + 8646557696 + ], + "row": [ + 0, + 953344 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 266, + "K": 17024, + "W": 10178, + "active": 524288, + "address_bits": 17850940800, + "d": 1048576, + "intervals": { + "active": [ + 8646540672, + 17572019584 + ], + "back": [ + 17572019584, + 17850940800 + ], + "back_spectator": [ + 17850940800, + 17850940800 + ], + "front0": [ + 953344, + 279874560 + ], + "front1": [ + 279874560, + 558795776 + ], + "front_spectator": [ + 558795776, + 8646540672 + ], + "row": [ + 0, + 953344 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 266, + "K": 17025, + "W": 10178, + "active": 524287, + "address_bits": 17851989375, + "d": 1048576, + "intervals": { + "active": [ + 8647065600, + 17573051775 + ], + "back": [ + 17573051775, + 17851972991 + ], + "back_spectator": [ + 17851972991, + 17851989375 + ], + "front0": [ + 953400, + 279874616 + ], + "front1": [ + 279874616, + 558795832 + ], + "front_spectator": [ + 558795832, + 8647065600 + ], + "row": [ + 0, + 953400 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32767 + }, + { + "G": 266, + "K": 17025, + "W": 10178, + "active": 524288, + "address_bits": 17851989375, + "d": 1048576, + "intervals": { + "active": [ + 8647048575, + 17573051775 + ], + "back": [ + 17573051775, + 17851972991 + ], + "back_spectator": [ + 17851972991, + 17851989375 + ], + "front0": [ + 953400, + 279874616 + ], + "front1": [ + 279874616, + 558795832 + ], + "front_spectator": [ + 558795832, + 8647048575 + ], + "row": [ + 0, + 953400 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32767 + }, + { + "G": 266, + "K": 34047, + "W": 10178, + "active": 524287, + "address_bits": 35700833025, + "d": 1048576, + "intervals": { + "active": [ + 17571486465, + 35421885954 + ], + "back": [ + 35421885954, + 35700807170 + ], + "back_spectator": [ + 35700807170, + 35700833025 + ], + "front0": [ + 1906632, + 280827848 + ], + "front1": [ + 280827848, + 559749064 + ], + "front_spectator": [ + 559749064, + 17571486465 + ], + "row": [ + 0, + 1906632 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 266, + "K": 34047, + "W": 10178, + "active": 524288, + "address_bits": 35700833025, + "d": 1048576, + "intervals": { + "active": [ + 17571452418, + 35421885954 + ], + "back": [ + 35421885954, + 35700807170 + ], + "back_spectator": [ + 35700807170, + 35700833025 + ], + "front0": [ + 1906632, + 280827848 + ], + "front1": [ + 280827848, + 559749064 + ], + "front_spectator": [ + 559749064, + 17571452418 + ], + "row": [ + 0, + 1906632 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 394, + "K": 25216, + "W": 10178, + "active": 32767, + "address_bits": 1652530560, + "d": 65536, + "intervals": { + "active": [ + 800456704, + 1626709376 + ], + "back": [ + 1626709376, + 1652530560 + ], + "back_spectator": [ + 1652530560, + 1652530560 + ], + "front0": [ + 1059072, + 26880256 + ], + "front1": [ + 26880256, + 52701440 + ], + "front_spectator": [ + 52701440, + 800456704 + ], + "row": [ + 0, + 1059072 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 394, + "K": 25216, + "W": 10178, + "active": 32768, + "address_bits": 1652530560, + "d": 65536, + "intervals": { + "active": [ + 800431488, + 1626709376 + ], + "back": [ + 1626709376, + 1652530560 + ], + "back_spectator": [ + 1652530560, + 1652530560 + ], + "front0": [ + 1059072, + 26880256 + ], + "front1": [ + 26880256, + 52701440 + ], + "front_spectator": [ + 52701440, + 800431488 + ], + "row": [ + 0, + 1059072 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 394, + "K": 25217, + "W": 10178, + "active": 32767, + "address_bits": 1652596095, + "d": 65536, + "intervals": { + "active": [ + 800488448, + 1626773887 + ], + "back": [ + 1626773887, + 1652595071 + ], + "back_spectator": [ + 1652595071, + 1652596095 + ], + "front0": [ + 1059114, + 26880298 + ], + "front1": [ + 26880298, + 52701482 + ], + "front_spectator": [ + 52701482, + 800488448 + ], + "row": [ + 0, + 1059114 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 394, + "K": 25217, + "W": 10178, + "active": 32768, + "address_bits": 1652596095, + "d": 65536, + "intervals": { + "active": [ + 800463231, + 1626773887 + ], + "back": [ + 1626773887, + 1652595071 + ], + "back_spectator": [ + 1652595071, + 1652596095 + ], + "front0": [ + 1059114, + 26880298 + ], + "front1": [ + 26880298, + 52701482 + ], + "front_spectator": [ + 52701482, + 800463231 + ], + "row": [ + 0, + 1059114 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 394, + "K": 50431, + "W": 10178, + "active": 32767, + "address_bits": 3304995585, + "d": 65536, + "intervals": { + "active": [ + 1626651905, + 3279124482 + ], + "back": [ + 3279124482, + 3304945666 + ], + "back_spectator": [ + 3304945666, + 3304995585 + ], + "front0": [ + 2118102, + 27939286 + ], + "front1": [ + 27939286, + 53760470 + ], + "front_spectator": [ + 53760470, + 1626651905 + ], + "row": [ + 0, + 2118102 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 394, + "K": 50431, + "W": 10178, + "active": 32768, + "address_bits": 3304995585, + "d": 65536, + "intervals": { + "active": [ + 1626601474, + 3279124482 + ], + "back": [ + 3279124482, + 3304945666 + ], + "back_spectator": [ + 3304945666, + 3304995585 + ], + "front0": [ + 2118102, + 27939286 + ], + "front1": [ + 27939286, + 53760470 + ], + "front_spectator": [ + 53760470, + 1626601474 + ], + "row": [ + 0, + 2118102 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 394, + "K": 25216, + "W": 10178, + "active": 131071, + "address_bits": 6610197888, + "d": 262144, + "intervals": { + "active": [ + 3201826816, + 6506913152 + ], + "back": [ + 6506913152, + 6610197888 + ], + "back_spectator": [ + 6610197888, + 6610197888 + ], + "front0": [ + 1059072, + 104343808 + ], + "front1": [ + 104343808, + 207628544 + ], + "front_spectator": [ + 207628544, + 3201826816 + ], + "row": [ + 0, + 1059072 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 394, + "K": 25216, + "W": 10178, + "active": 131072, + "address_bits": 6610197888, + "d": 262144, + "intervals": { + "active": [ + 3201801600, + 6506913152 + ], + "back": [ + 6506913152, + 6610197888 + ], + "back_spectator": [ + 6610197888, + 6610197888 + ], + "front0": [ + 1059072, + 104343808 + ], + "front1": [ + 104343808, + 207628544 + ], + "front_spectator": [ + 207628544, + 3201801600 + ], + "row": [ + 0, + 1059072 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 394, + "K": 25217, + "W": 10178, + "active": 131071, + "address_bits": 6610460031, + "d": 262144, + "intervals": { + "active": [ + 3201953792, + 6507171199 + ], + "back": [ + 6507171199, + 6610455935 + ], + "back_spectator": [ + 6610455935, + 6610460031 + ], + "front0": [ + 1059114, + 104343850 + ], + "front1": [ + 104343850, + 207628586 + ], + "front_spectator": [ + 207628586, + 3201953792 + ], + "row": [ + 0, + 1059114 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 394, + "K": 25217, + "W": 10178, + "active": 131072, + "address_bits": 6610460031, + "d": 262144, + "intervals": { + "active": [ + 3201928575, + 6507171199 + ], + "back": [ + 6507171199, + 6610455935 + ], + "back_spectator": [ + 6610455935, + 6610460031 + ], + "front0": [ + 1059114, + 104343850 + ], + "front1": [ + 104343850, + 207628586 + ], + "front_spectator": [ + 207628586, + 3201928575 + ], + "row": [ + 0, + 1059114 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 394, + "K": 50431, + "W": 10178, + "active": 131071, + "address_bits": 13220133633, + "d": 262144, + "intervals": { + "active": [ + 6506758913, + 13116800514 + ], + "back": [ + 13116800514, + 13220085250 + ], + "back_spectator": [ + 13220085250, + 13220133633 + ], + "front0": [ + 2118102, + 105402838 + ], + "front1": [ + 105402838, + 208687574 + ], + "front_spectator": [ + 208687574, + 6506758913 + ], + "row": [ + 0, + 2118102 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 394, + "K": 50431, + "W": 10178, + "active": 131072, + "address_bits": 13220133633, + "d": 262144, + "intervals": { + "active": [ + 6506708482, + 13116800514 + ], + "back": [ + 13116800514, + 13220085250 + ], + "back_spectator": [ + 13220085250, + 13220133633 + ], + "front0": [ + 2118102, + 105402838 + ], + "front1": [ + 105402838, + 208687574 + ], + "front_spectator": [ + 208687574, + 6506708482 + ], + "row": [ + 0, + 2118102 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 394, + "K": 25216, + "W": 10178, + "active": 524287, + "address_bits": 26440867200, + "d": 1048576, + "intervals": { + "active": [ + 12807307264, + 26027728256 + ], + "back": [ + 26027728256, + 26440867200 + ], + "back_spectator": [ + 26440867200, + 26440867200 + ], + "front0": [ + 1412096, + 414551040 + ], + "front1": [ + 414551040, + 827689984 + ], + "front_spectator": [ + 827689984, + 12807307264 + ], + "row": [ + 0, + 1412096 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 394, + "K": 25216, + "W": 10178, + "active": 524288, + "address_bits": 26440867200, + "d": 1048576, + "intervals": { + "active": [ + 12807282048, + 26027728256 + ], + "back": [ + 26027728256, + 26440867200 + ], + "back_spectator": [ + 26440867200, + 26440867200 + ], + "front0": [ + 1412096, + 414551040 + ], + "front1": [ + 414551040, + 827689984 + ], + "front_spectator": [ + 827689984, + 12807282048 + ], + "row": [ + 0, + 1412096 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 394, + "K": 25217, + "W": 10178, + "active": 524287, + "address_bits": 26441915775, + "d": 1048576, + "intervals": { + "active": [ + 12807815168, + 26028760447 + ], + "back": [ + 26028760447, + 26441899391 + ], + "back_spectator": [ + 26441899391, + 26441915775 + ], + "front0": [ + 1412152, + 414551096 + ], + "front1": [ + 414551096, + 827690040 + ], + "front_spectator": [ + 827690040, + 12807815168 + ], + "row": [ + 0, + 1412152 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32767 + }, + { + "G": 394, + "K": 25217, + "W": 10178, + "active": 524288, + "address_bits": 26441915775, + "d": 1048576, + "intervals": { + "active": [ + 12807789951, + 26028760447 + ], + "back": [ + 26028760447, + 26441899391 + ], + "back_spectator": [ + 26441899391, + 26441915775 + ], + "front0": [ + 1412152, + 414551096 + ], + "front1": [ + 414551096, + 827690040 + ], + "front_spectator": [ + 827690040, + 12807789951 + ], + "row": [ + 0, + 1412152 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32767 + }, + { + "G": 394, + "K": 50431, + "W": 10178, + "active": 524287, + "address_bits": 52880685825, + "d": 1048576, + "intervals": { + "active": [ + 26027186945, + 52467504642 + ], + "back": [ + 52467504642, + 52880643586 + ], + "back_spectator": [ + 52880643586, + 52880685825 + ], + "front0": [ + 2824136, + 415963080 + ], + "front1": [ + 415963080, + 829102024 + ], + "front_spectator": [ + 829102024, + 26027186945 + ], + "row": [ + 0, + 2824136 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 394, + "K": 50431, + "W": 10178, + "active": 524288, + "address_bits": 52880685825, + "d": 1048576, + "intervals": { + "active": [ + 26027136514, + 52467504642 + ], + "back": [ + 52467504642, + 52880643586 + ], + "back_spectator": [ + 52880643586, + 52880685825 + ], + "front0": [ + 2824136, + 415963080 + ], + "front1": [ + 415963080, + 829102024 + ], + "front_spectator": [ + 829102024, + 26027136514 + ], + "row": [ + 0, + 2824136 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 522, + "K": 33408, + "W": 10178, + "active": 32767, + "address_bits": 2189393280, + "d": 65536, + "intervals": { + "active": [ + 1060503552, + 2155183488 + ], + "back": [ + 2155183488, + 2189393280 + ], + "back_spectator": [ + 2189393280, + 2189393280 + ], + "front0": [ + 1403136, + 35612928 + ], + "front1": [ + 35612928, + 69822720 + ], + "front_spectator": [ + 69822720, + 1060503552 + ], + "row": [ + 0, + 1403136 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 522, + "K": 33408, + "W": 10178, + "active": 32768, + "address_bits": 2189393280, + "d": 65536, + "intervals": { + "active": [ + 1060470144, + 2155183488 + ], + "back": [ + 2155183488, + 2189393280 + ], + "back_spectator": [ + 2189393280, + 2189393280 + ], + "front0": [ + 1403136, + 35612928 + ], + "front1": [ + 35612928, + 69822720 + ], + "front_spectator": [ + 69822720, + 1060470144 + ], + "row": [ + 0, + 1403136 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 522, + "K": 33409, + "W": 10178, + "active": 32767, + "address_bits": 2189458815, + "d": 65536, + "intervals": { + "active": [ + 1060535296, + 2155247999 + ], + "back": [ + 2155247999, + 2189457791 + ], + "back_spectator": [ + 2189457791, + 2189458815 + ], + "front0": [ + 1403178, + 35612970 + ], + "front1": [ + 35612970, + 69822762 + ], + "front_spectator": [ + 69822762, + 1060535296 + ], + "row": [ + 0, + 1403178 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 522, + "K": 33409, + "W": 10178, + "active": 32768, + "address_bits": 2189458815, + "d": 65536, + "intervals": { + "active": [ + 1060501887, + 2155247999 + ], + "back": [ + 2155247999, + 2189457791 + ], + "back_spectator": [ + 2189457791, + 2189458815 + ], + "front0": [ + 1403178, + 35612970 + ], + "front1": [ + 35612970, + 69822762 + ], + "front_spectator": [ + 69822762, + 1060501887 + ], + "row": [ + 0, + 1403178 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 1024, + "qF": 2048 + }, + { + "G": 522, + "K": 66815, + "W": 10178, + "active": 32767, + "address_bits": 4378721025, + "d": 65536, + "intervals": { + "active": [ + 2155117825, + 4344444930 + ], + "back": [ + 4344444930, + 4378654722 + ], + "back_spectator": [ + 4378654722, + 4378721025 + ], + "front0": [ + 2806230, + 37016022 + ], + "front1": [ + 37016022, + 71225814 + ], + "front_spectator": [ + 71225814, + 2155117825 + ], + "row": [ + 0, + 2806230 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32768, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 522, + "K": 66815, + "W": 10178, + "active": 32768, + "address_bits": 4378721025, + "d": 65536, + "intervals": { + "active": [ + 2155051010, + 4344444930 + ], + "back": [ + 4344444930, + 4378654722 + ], + "back_spectator": [ + 4378654722, + 4378721025 + ], + "front0": [ + 2806230, + 37016022 + ], + "front1": [ + 37016022, + 71225814 + ], + "front_spectator": [ + 71225814, + 2155051010 + ], + "row": [ + 0, + 2806230 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 32767, + "q0": 42, + "qB": 513, + "qF": 1025 + }, + { + "G": 522, + "K": 33408, + "W": 10178, + "active": 131071, + "address_bits": 8757673344, + "d": 262144, + "intervals": { + "active": [ + 4242014208, + 8620834176 + ], + "back": [ + 8620834176, + 8757673344 + ], + "back_spectator": [ + 8757673344, + 8757673344 + ], + "front0": [ + 1403136, + 138242304 + ], + "front1": [ + 138242304, + 275081472 + ], + "front_spectator": [ + 275081472, + 4242014208 + ], + "row": [ + 0, + 1403136 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 522, + "K": 33408, + "W": 10178, + "active": 131072, + "address_bits": 8757673344, + "d": 262144, + "intervals": { + "active": [ + 4241980800, + 8620834176 + ], + "back": [ + 8620834176, + 8757673344 + ], + "back_spectator": [ + 8757673344, + 8757673344 + ], + "front0": [ + 1403136, + 138242304 + ], + "front1": [ + 138242304, + 275081472 + ], + "front_spectator": [ + 275081472, + 4241980800 + ], + "row": [ + 0, + 1403136 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 522, + "K": 33409, + "W": 10178, + "active": 131071, + "address_bits": 8757935487, + "d": 262144, + "intervals": { + "active": [ + 4242141184, + 8621092223 + ], + "back": [ + 8621092223, + 8757931391 + ], + "back_spectator": [ + 8757931391, + 8757935487 + ], + "front0": [ + 1403178, + 138242346 + ], + "front1": [ + 138242346, + 275081514 + ], + "front_spectator": [ + 275081514, + 4242141184 + ], + "row": [ + 0, + 1403178 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 522, + "K": 33409, + "W": 10178, + "active": 131072, + "address_bits": 8757935487, + "d": 262144, + "intervals": { + "active": [ + 4242107775, + 8621092223 + ], + "back": [ + 8621092223, + 8757931391 + ], + "back_spectator": [ + 8757931391, + 8757935487 + ], + "front0": [ + 1403178, + 138242346 + ], + "front1": [ + 138242346, + 275081514 + ], + "front_spectator": [ + 275081514, + 4242107775 + ], + "row": [ + 0, + 1403178 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 522, + "K": 66815, + "W": 10178, + "active": 131071, + "address_bits": 17515084545, + "d": 262144, + "intervals": { + "active": [ + 8620671745, + 17378180610 + ], + "back": [ + 17378180610, + 17515019778 + ], + "back_spectator": [ + 17515019778, + 17515084545 + ], + "front0": [ + 2806230, + 139645398 + ], + "front1": [ + 139645398, + 276484566 + ], + "front_spectator": [ + 276484566, + 8620671745 + ], + "row": [ + 0, + 2806230 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 522, + "K": 66815, + "W": 10178, + "active": 131072, + "address_bits": 17515084545, + "d": 262144, + "intervals": { + "active": [ + 8620604930, + 17378180610 + ], + "back": [ + 17378180610, + 17515019778 + ], + "back_spectator": [ + 17515019778, + 17515084545 + ], + "front0": [ + 2806230, + 139645398 + ], + "front1": [ + 139645398, + 276484566 + ], + "front_spectator": [ + 276484566, + 8620604930 + ], + "row": [ + 0, + 2806230 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 522, + "K": 33408, + "W": 10178, + "active": 524287, + "address_bits": 35030793600, + "d": 1048576, + "intervals": { + "active": [ + 16968056832, + 34483436928 + ], + "back": [ + 34483436928, + 35030793600 + ], + "back_spectator": [ + 35030793600, + 35030793600 + ], + "front0": [ + 1870848, + 549227520 + ], + "front1": [ + 549227520, + 1096584192 + ], + "front_spectator": [ + 1096584192, + 16968056832 + ], + "row": [ + 0, + 1870848 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 522, + "K": 33408, + "W": 10178, + "active": 524288, + "address_bits": 35030793600, + "d": 1048576, + "intervals": { + "active": [ + 16968023424, + 34483436928 + ], + "back": [ + 34483436928, + 35030793600 + ], + "back_spectator": [ + 35030793600, + 35030793600 + ], + "front0": [ + 1870848, + 549227520 + ], + "front1": [ + 549227520, + 1096584192 + ], + "front_spectator": [ + 1096584192, + 16968023424 + ], + "row": [ + 0, + 1870848 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 522, + "K": 33409, + "W": 10178, + "active": 524287, + "address_bits": 35031842175, + "d": 1048576, + "intervals": { + "active": [ + 16968564736, + 34484469119 + ], + "back": [ + 34484469119, + 35031825791 + ], + "back_spectator": [ + 35031825791, + 35031842175 + ], + "front0": [ + 1870904, + 549227576 + ], + "front1": [ + 549227576, + 1096584248 + ], + "front_spectator": [ + 1096584248, + 16968564736 + ], + "row": [ + 0, + 1870904 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 522, + "K": 33409, + "W": 10178, + "active": 524288, + "address_bits": 35031842175, + "d": 1048576, + "intervals": { + "active": [ + 16968531327, + 34484469119 + ], + "back": [ + 34484469119, + 35031825791 + ], + "back_spectator": [ + 35031825791, + 35031842175 + ], + "front0": [ + 1870904, + 549227576 + ], + "front1": [ + 549227576, + 1096584248 + ], + "front_spectator": [ + 1096584248, + 16968531327 + ], + "row": [ + 0, + 1870904 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 522, + "K": 66815, + "W": 10178, + "active": 524287, + "address_bits": 70060538625, + "d": 1048576, + "intervals": { + "active": [ + 34482887425, + 69513123330 + ], + "back": [ + 69513123330, + 70060480002 + ], + "back_spectator": [ + 70060480002, + 70060538625 + ], + "front0": [ + 3741640, + 551098312 + ], + "front1": [ + 551098312, + 1098454984 + ], + "front_spectator": [ + 1098454984, + 34482887425 + ], + "row": [ + 0, + 3741640 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 522, + "K": 66815, + "W": 10178, + "active": 524288, + "address_bits": 70060538625, + "d": 1048576, + "intervals": { + "active": [ + 34482820610, + 69513123330 + ], + "back": [ + 69513123330, + 70060480002 + ], + "back_spectator": [ + 70060480002, + 70060538625 + ], + "front0": [ + 3741640, + 551098312 + ], + "front1": [ + 551098312, + 1098454984 + ], + "front_spectator": [ + 1098454984, + 34482820610 + ], + "row": [ + 0, + 3741640 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 1034, + "K": 66176, + "W": 10178, + "active": 131071, + "address_bits": 17347575168, + "d": 262144, + "intervals": { + "active": [ + 8402763776, + 17076518272 + ], + "back": [ + 17076518272, + 17347575168 + ], + "back_spectator": [ + 17347575168, + 17347575168 + ], + "front0": [ + 2779392, + 273836288 + ], + "front1": [ + 273836288, + 544893184 + ], + "front_spectator": [ + 544893184, + 8402763776 + ], + "row": [ + 0, + 2779392 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 1034, + "K": 66176, + "W": 10178, + "active": 131072, + "address_bits": 17347575168, + "d": 262144, + "intervals": { + "active": [ + 8402697600, + 17076518272 + ], + "back": [ + 17076518272, + 17347575168 + ], + "back_spectator": [ + 17347575168, + 17347575168 + ], + "front0": [ + 2779392, + 273836288 + ], + "front1": [ + 273836288, + 544893184 + ], + "front_spectator": [ + 544893184, + 8402697600 + ], + "row": [ + 0, + 2779392 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 1034, + "K": 66177, + "W": 10178, + "active": 131071, + "address_bits": 17347837311, + "d": 262144, + "intervals": { + "active": [ + 8402890752, + 17076776319 + ], + "back": [ + 17076776319, + 17347833215 + ], + "back_spectator": [ + 17347833215, + 17347837311 + ], + "front0": [ + 2779434, + 273836330 + ], + "front1": [ + 273836330, + 544893226 + ], + "front_spectator": [ + 544893226, + 8402890752 + ], + "row": [ + 0, + 2779434 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 1034, + "K": 66177, + "W": 10178, + "active": 131072, + "address_bits": 17347837311, + "d": 262144, + "intervals": { + "active": [ + 8402824575, + 17076776319 + ], + "back": [ + 17076776319, + 17347833215 + ], + "back_spectator": [ + 17347833215, + 17347837311 + ], + "front0": [ + 2779434, + 273836330 + ], + "front1": [ + 273836330, + 544893226 + ], + "front_spectator": [ + 544893226, + 8402824575 + ], + "row": [ + 0, + 2779434 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 4096, + "qF": 8192 + }, + { + "G": 1034, + "K": 132351, + "W": 10178, + "active": 131071, + "address_bits": 34694888193, + "d": 262144, + "intervals": { + "active": [ + 17076323073, + 34423700994 + ], + "back": [ + 34423700994, + 34694757890 + ], + "back_spectator": [ + 34694757890, + 34694888193 + ], + "front0": [ + 5558742, + 276615638 + ], + "front1": [ + 276615638, + 547672534 + ], + "front_spectator": [ + 547672534, + 17076323073 + ], + "row": [ + 0, + 5558742 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131072, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 1034, + "K": 132351, + "W": 10178, + "active": 131072, + "address_bits": 34694888193, + "d": 262144, + "intervals": { + "active": [ + 17076190722, + 34423700994 + ], + "back": [ + 34423700994, + 34694757890 + ], + "back_spectator": [ + 34694757890, + 34694888193 + ], + "front0": [ + 5558742, + 276615638 + ], + "front1": [ + 276615638, + 547672534 + ], + "front_spectator": [ + 547672534, + 17076190722 + ], + "row": [ + 0, + 5558742 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 131071, + "q0": 42, + "qB": 2049, + "qF": 4097 + }, + { + "G": 1034, + "K": 66176, + "W": 10178, + "active": 524287, + "address_bits": 69390499200, + "d": 1048576, + "intervals": { + "active": [ + 33611055104, + 68306271616 + ], + "back": [ + 68306271616, + 69390499200 + ], + "back_spectator": [ + 69390499200, + 69390499200 + ], + "front0": [ + 3705856, + 1087933440 + ], + "front1": [ + 1087933440, + 2172161024 + ], + "front_spectator": [ + 2172161024, + 33611055104 + ], + "row": [ + 0, + 3705856 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 1034, + "K": 66176, + "W": 10178, + "active": 524288, + "address_bits": 69390499200, + "d": 1048576, + "intervals": { + "active": [ + 33610988928, + 68306271616 + ], + "back": [ + 68306271616, + 69390499200 + ], + "back_spectator": [ + 69390499200, + 69390499200 + ], + "front0": [ + 3705856, + 1087933440 + ], + "front1": [ + 1087933440, + 2172161024 + ], + "front_spectator": [ + 2172161024, + 33610988928 + ], + "row": [ + 0, + 3705856 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 1034, + "K": 66177, + "W": 10178, + "active": 524287, + "address_bits": 69391547775, + "d": 1048576, + "intervals": { + "active": [ + 33611563008, + 68307303807 + ], + "back": [ + 68307303807, + 69391531391 + ], + "back_spectator": [ + 69391531391, + 69391547775 + ], + "front0": [ + 3705912, + 1087933496 + ], + "front1": [ + 1087933496, + 2172161080 + ], + "front_spectator": [ + 2172161080, + 33611563008 + ], + "row": [ + 0, + 3705912 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 1034, + "K": 66177, + "W": 10178, + "active": 524288, + "address_bits": 69391547775, + "d": 1048576, + "intervals": { + "active": [ + 33611496831, + 68307303807 + ], + "back": [ + 68307303807, + 69391531391 + ], + "back_spectator": [ + 69391531391, + 69391547775 + ], + "front0": [ + 3705912, + 1087933496 + ], + "front1": [ + 1087933496, + 2172161080 + ], + "front_spectator": [ + 2172161080, + 33611496831 + ], + "row": [ + 0, + 3705912 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 16384, + "qF": 32768 + }, + { + "G": 1034, + "K": 132351, + "W": 10178, + "active": 524287, + "address_bits": 138779949825, + "d": 1048576, + "intervals": { + "active": [ + 68305689345, + 137695598082 + ], + "back": [ + 137695598082, + 138779825666 + ], + "back_spectator": [ + 138779825666, + 138779949825 + ], + "front0": [ + 7411656, + 1091639240 + ], + "front1": [ + 1091639240, + 2175866824 + ], + "front_spectator": [ + 2175866824, + 68305689345 + ], + "row": [ + 0, + 7411656 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524288, + "q0": 56, + "qB": 8193, + "qF": 16385 + }, + { + "G": 1034, + "K": 132351, + "W": 10178, + "active": 524288, + "address_bits": 138779949825, + "d": 1048576, + "intervals": { + "active": [ + 68305556994, + 137695598082 + ], + "back": [ + 137695598082, + 138779825666 + ], + "back_spectator": [ + 138779825666, + 138779949825 + ], + "front0": [ + 7411656, + 1091639240 + ], + "front1": [ + 1091639240, + 2175866824 + ], + "front_spectator": [ + 2175866824, + 68305556994 + ], + "row": [ + 0, + 7411656 + ] + }, + "m": 89, + "new_coordinate_bits": 0, + "opposite": 524287, + "q0": 56, + "qB": 8193, + "qF": 16385 + } + ], + "literal_layout_count": 84, + "mutations_rejected": [ + "insufficient opposite-set capacity", + "row and compact-field alias", + "insufficient existing top-layout address volume" + ], + "parameter_witnesses": [ + { + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "capacity_cutoffs": [ + { + "K_log2_lower": "12482006", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "19320508550", + "d_over8_log2_lower": "19295544524", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "646885620346199024471098287662063723653797700467741013385779545224344845509420790679523380957561878887726256776500125140896629796855687641317657856210866691792198459075459973553828374555756062855065747/1001293771240692396047648425334631731399659170066303750627112389024144939063906452557214107698008671200561344815544329049720448444049382325562186871663039407821397525255111512125710131494000000000000000000", + "row_log2_W_upper": 14, + "top_capacity": [ + { + "compressed_exponent": "19308026538", + "linear_coefficient": "2016", + "power_gap": "1000646885620346198024471098287662063723653797700467741013385779545224344845509420790679523380957561878887726256776500125140896629796855687641317657856210866691792198459075459973553828374555756062855065747/1001293771240692396047648425334631731399659170066303750627112389024144939063906452557214107698008671200561344815544329049720448444049382325562186871663039407821397525255111512125710131494000000000000000000" + }, + { + "compressed_exponent": "24964020", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "12482010", + "linear_coefficient": "48", + "power_gap": "646885620346199024471098287662063723653797700467741013385779545224344845509420790679523380957561878887726256776500125140896629796855687641317657856210866691792198459075459973553828374555756062855065747/1001293771240692396047648425334631731399659170066303750627112389024144939063906452557214107698008671200561344815544329049720448444049382325562186871663039407821397525255111512125710131494000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + }, + { + "K_log2_lower": "12482006", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "19320508550", + "d_over8_log2_lower": "19295544524", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "646885620346199024471098287662063723653797700467741013385779545224344845509420790679523380957561878887726256776500125140896629796855687641317657856210866691792198459075459973553828374555756062855065747/1001293771240692396047648425334631731399659170066303750627112389024144939063906452557214107698008671200561344815544329049720448444049382325562186871663039407821397525255111512125710131494000000000000000000", + "row_log2_W_upper": 4000, + "top_capacity": [ + { + "compressed_exponent": "19308026538", + "linear_coefficient": "576000", + "power_gap": "1000646885620346198024471098287662063723653797700467741013385779545224344845509420790679523380957561878887726256776500125140896629796855687641317657856210866691792198459075459973553828374555756062855065747/1001293771240692396047648425334631731399659170066303750627112389024144939063906452557214107698008671200561344815544329049720448444049382325562186871663039407821397525255111512125710131494000000000000000000" + }, + { + "compressed_exponent": "24964020", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "12482010", + "linear_coefficient": "48", + "power_gap": "646885620346199024471098287662063723653797700467741013385779545224344845509420790679523380957561878887726256776500125140896629796855687641317657856210866691792198459075459973553828374555756062855065747/1001293771240692396047648425334631731399659170066303750627112389024144939063906452557214107698008671200561344815544329049720448444049382325562186871663039407821397525255111512125710131494000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + } + ], + "old_rejections": [ + "compact_reservations", + "q_below_reservations" + ], + "q": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "removed_obligations": [ + "compact_reservations", + "q_below_reservations", + "balanced_prefix_above_kappa" + ], + "retained_strict_count": 44, + "unchanged_kappa": "646049779721139/500000000000000000" + }, + { + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "capacity_cutoffs": [ + { + "K_log2_lower": "12680133", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "39254366578", + "d_over8_log2_lower": "39203646023", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "1940656861038596072119523622293795123312967766771491640498168569369283909415873347893631078966233079449071072320829174861345073846238013203504529519250274513189723714186972099263959868555756062855065747/2002587542481384792095296850669263462799318340132607501254224778048289878127812905114428215396017342401122689631088658099440896888098764651124373743326078815642795050510223024251420262988000000000000000000", + "row_log2_W_upper": 14, + "top_capacity": [ + { + "compressed_exponent": "39241686439", + "linear_coefficient": "2016", + "power_gap": "2001940656861038594072119523622293795123312967766771491640498168569369283909415873347893631078966233079449071072320829174861345073846238013203504529519250274513189723714186972099263959868555756062855065747/2002587542481384792095296850669263462799318340132607501254224778048289878127812905114428215396017342401122689631088658099440896888098764651124373743326078815642795050510223024251420262988000000000000000000" + }, + { + "compressed_exponent": "50720549", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "38040412", + "linear_coefficient": "48", + "power_gap": "1940656861038596072119523622293795123312967766771491640498168569369283909415873347893631078966233079449071072320829174861345073846238013203504529519250274513189723714186972099263959868555756062855065747/2002587542481384792095296850669263462799318340132607501254224778048289878127812905114428215396017342401122689631088658099440896888098764651124373743326078815642795050510223024251420262988000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + }, + { + "K_log2_lower": "12680133", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "39254366578", + "d_over8_log2_lower": "39203646023", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "1940656861038596072119523622293795123312967766771491640498168569369283909415873347893631078966233079449071072320829174861345073846238013203504529519250274513189723714186972099263959868555756062855065747/2002587542481384792095296850669263462799318340132607501254224778048289878127812905114428215396017342401122689631088658099440896888098764651124373743326078815642795050510223024251420262988000000000000000000", + "row_log2_W_upper": 4000, + "top_capacity": [ + { + "compressed_exponent": "39241686439", + "linear_coefficient": "576000", + "power_gap": "2001940656861038594072119523622293795123312967766771491640498168569369283909415873347893631078966233079449071072320829174861345073846238013203504529519250274513189723714186972099263959868555756062855065747/2002587542481384792095296850669263462799318340132607501254224778048289878127812905114428215396017342401122689631088658099440896888098764651124373743326078815642795050510223024251420262988000000000000000000" + }, + { + "compressed_exponent": "50720549", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "38040412", + "linear_coefficient": "48", + "power_gap": "1940656861038596072119523622293795123312967766771491640498168569369283909415873347893631078966233079449071072320829174861345073846238013203504529519250274513189723714186972099263959868555756062855065747/2002587542481384792095296850669263462799318340132607501254224778048289878127812905114428215396017342401122689631088658099440896888098764651124373743326078815642795050510223024251420262988000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + } + ], + "old_rejections": [ + "compact_reservations", + "q_below_reservations" + ], + "q": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "removed_obligations": [ + "compact_reservations", + "q_below_reservations", + "balanced_prefix_above_kappa" + ], + "retained_strict_count": 44, + "unchanged_kappa": "646049779721139/500000000000000000" + }, + { + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "capacity_cutoffs": [ + { + "K_log2_lower": "50720545", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "628069865233", + "d_over8_log2_lower": "627258336431", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "9703284305192978358010075630084183521267988164593995403172502714238918292854588691178277267018260282817139965586803473184035738142531966576625759497486721441574875244856044853524748832555756062855065747/8010350169925539168381187402677053851197273360530430005016899112193159512511251620457712861584069369604490758524354632397763587552395058604497494973304315262571180202040892097005681051952000000000000000000", + "row_log2_W_upper": 14, + "top_capacity": [ + { + "compressed_exponent": "628019144682", + "linear_coefficient": "2016", + "power_gap": "8009703284305192970358010075630084183521267988164593995403172502714238918292854588691178277267018260282817139965586803473184035738142531966576625759497486721441574875244856044853524748832555756062855065747/8010350169925539168381187402677053851197273360530430005016899112193159512511251620457712861584069369604490758524354632397763587552395058604497494973304315262571180202040892097005681051952000000000000000000" + }, + { + "compressed_exponent": "811528796", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "760808246", + "linear_coefficient": "48", + "power_gap": "9703284305192978358010075630084183521267988164593995403172502714238918292854588691178277267018260282817139965586803473184035738142531966576625759497486721441574875244856044853524748832555756062855065747/8010350169925539168381187402677053851197273360530430005016899112193159512511251620457712861584069369604490758524354632397763587552395058604497494973304315262571180202040892097005681051952000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + }, + { + "K_log2_lower": "50720545", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/8000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "628069865233", + "d_over8_log2_lower": "627258336431", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "9703284305192978358010075630084183521267988164593995403172502714238918292854588691178277267018260282817139965586803473184035738142531966576625759497486721441574875244856044853524748832555756062855065747/8010350169925539168381187402677053851197273360530430005016899112193159512511251620457712861584069369604490758524354632397763587552395058604497494973304315262571180202040892097005681051952000000000000000000", + "row_log2_W_upper": 4000, + "top_capacity": [ + { + "compressed_exponent": "628019144682", + "linear_coefficient": "576000", + "power_gap": "8009703284305192970358010075630084183521267988164593995403172502714238918292854588691178277267018260282817139965586803473184035738142531966576625759497486721441574875244856044853524748832555756062855065747/8010350169925539168381187402677053851197273360530430005016899112193159512511251620457712861584069369604490758524354632397763587552395058604497494973304315262571180202040892097005681051952000000000000000000" + }, + { + "compressed_exponent": "811528796", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "760808246", + "linear_coefficient": "48", + "power_gap": "9703284305192978358010075630084183521267988164593995403172502714238918292854588691178277267018260282817139965586803473184035738142531966576625759497486721441574875244856044853524748832555756062855065747/8010350169925539168381187402677053851197273360530430005016899112193159512511251620457712861584069369604490758524354632397763587552395058604497494973304315262571180202040892097005681051952000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + } + ], + "old_rejections": [ + "compact_reservations", + "q_below_reservations" + ], + "q": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "removed_obligations": [ + "compact_reservations", + "q_below_reservations", + "balanced_prefix_above_kappa" + ], + "retained_strict_count": 44, + "unchanged_kappa": "646049779721139/500000000000000000" + }, + { + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/512000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "capacity_cutoffs": [ + { + "K_log2_lower": "3246115180", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/512000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "2572574167990697", + "d_over8_log2_lower": "2569250146041598", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "661763989614161090372816444284476808949489701581684311467816570883288206501706677527088557063388545365734926999928644532290051539031224049918809077669348263425927603821058156211431021808555756062855065747/512662410875234506776395993771331446476625495073947520321081543180362208800720103709293623141380439654687408545558696473456869603353283750687839678291476176804555532930617094208363587324928000000000000000000", + "row_log2_W_upper": 14, + "top_capacity": [ + { + "compressed_exponent": "2572570921875511", + "linear_coefficient": "2016", + "power_gap": "512661763989614160578372816444284476808949489701581684311467816570883288206501706677527088557063388545365734926999928644532290051539031224049918809077669348263425927603821058156211431021808555756062855065747/512662410875234506776395993771331446476625495073947520321081543180362208800720103709293623141380439654687408545558696473456869603353283750687839678291476176804555532930617094208363587324928000000000000000000" + }, + { + "compressed_exponent": "3324021949093", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "3320775833908", + "linear_coefficient": "48", + "power_gap": "661763989614161090372816444284476808949489701581684311467816570883288206501706677527088557063388545365734926999928644532290051539031224049918809077669348263425927603821058156211431021808555756062855065747/512662410875234506776395993771331446476625495073947520321081543180362208800720103709293623141380439654687408545558696473456869603353283750687839678291476176804555532930617094208363587324928000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + }, + { + "K_log2_lower": "3246115180", + "address_volume_lower": "1/16 * p", + "c": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/512000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "ceil_log2_p_cutoff": "2572574167990697", + "d_over8_log2_lower": "2569250146041598", + "epsilon": "499999999999999999500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747", + "geometry_gap": "661763989614161090372816444284476808949489701581684311467816570883288206501706677527088557063388545365734926999928644532290051539031224049918809077669348263425927603821058156211431021808555756062855065747/512662410875234506776395993771331446476625495073947520321081543180362208800720103709293623141380439654687408545558696473456869603353283750687839678291476176804555532930617094208363587324928000000000000000000", + "row_log2_W_upper": 4000, + "top_capacity": [ + { + "compressed_exponent": "2572570921875511", + "linear_coefficient": "576000", + "power_gap": "512661763989614160578372816444284476808949489701581684311467816570883288206501706677527088557063388545365734926999928644532290051539031224049918809077669348263425927603821058156211431021808555756062855065747/512662410875234506776395993771331446476625495073947520321081543180362208800720103709293623141380439654687408545558696473456869603353283750687839678291476176804555532930617094208363587324928000000000000000000" + }, + { + "compressed_exponent": "3324021949093", + "linear_coefficient": "2016", + "power_gap": "646885620346198523824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747" + }, + { + "compressed_exponent": "3320775833908", + "linear_coefficient": "48", + "power_gap": "661763989614161090372816444284476808949489701581684311467816570883288206501706677527088557063388545365734926999928644532290051539031224049918809077669348263425927603821058156211431021808555756062855065747/512662410875234506776395993771331446476625495073947520321081543180362208800720103709293623141380439654687408545558696473456869603353283750687839678291476176804555532930617094208363587324928000000000000000000" + } + ], + "uniform_argument": "2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0" + } + ], + "old_rejections": [ + "compact_reservations", + "q_below_reservations" + ], + "q": "646885620346198023824212667315865699829585033151875313556194512072469531953226278607053849004335600280672407772164524860224222024691162781093435831519703910698762627555756062855065747/500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "removed_obligations": [ + "compact_reservations", + "q_below_reservations", + "balanced_prefix_above_kappa" + ], + "retained_strict_count": 44, + "unchanged_kappa": "646049779721139/500000000000000000" + } + ], + "precision_inequalities_checked": 255, + "scope": "Capacity and retained-constraint arithmetic; no new multiplication exponent or machine-time measurement.", + "status": "PASS", + "top_layout_count": 168, + "top_layouts": [ + { + "G": 202, + "K": 12928, + "d": 65536, + "intervals": { + "active": [ + 27019520, + 27032448 + ], + "back": [ + 27032448, + 40270720 + ], + "front0": [ + 542976, + 13781248 + ], + "front1": [ + 13781248, + 27019520 + ], + "remainder": [ + 40270720, + 281470681743360 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281470681743360", + "needed_bits": 40270720, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 12928, + "d": 65536, + "intervals": { + "active": [ + 27019520, + 450644224 + ], + "back": [ + 450644224, + 463882496 + ], + "front0": [ + 542976, + 13781248 + ], + "front1": [ + 13781248, + 27019520 + ], + "remainder": [ + 463882496, + 281470681743360 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281470681743360", + "needed_bits": 463882496, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 202, + "K": 12928, + "d": 65536, + "intervals": { + "active": [ + 27019520, + 874256000 + ], + "back": [ + 874256000, + 887494272 + ], + "front0": [ + 542976, + 13781248 + ], + "front1": [ + 13781248, + 27019520 + ], + "remainder": [ + 887494272, + 281470681743360 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281470681743360", + "needed_bits": 887494272, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 202, + "K": 12928, + "d": 65536, + "intervals": { + "active": [ + 27019520, + 874268928 + ], + "back": [ + 874268928, + 887507200 + ], + "front0": [ + 542976, + 13781248 + ], + "front1": [ + 13781248, + 27019520 + ], + "remainder": [ + 887507200, + 281470681743360 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281470681743360", + "needed_bits": 887507200, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 202, + "K": 12929, + "d": 65536, + "intervals": { + "active": [ + 27019562, + 27032491 + ], + "back": [ + 27032491, + 40270763 + ], + "front0": [ + 543018, + 13781290 + ], + "front1": [ + 13781290, + 27019562 + ], + "remainder": [ + 40270763, + 281470681743360 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281470681743360", + "needed_bits": 40270763, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 12929, + "d": 65536, + "intervals": { + "active": [ + 27019562, + 450677034 + ], + "back": [ + 450677034, + 463915306 + ], + "front0": [ + 543018, + 13781290 + ], + "front1": [ + 13781290, + 27019562 + ], + "remainder": [ + 463915306, + 281470681743360 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281470681743360", + "needed_bits": 463915306, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 202, + "K": 12929, + "d": 65536, + "intervals": { + "active": [ + 27019562, + 874321577 + ], + "back": [ + 874321577, + 887559849 + ], + "front0": [ + 543018, + 13781290 + ], + "front1": [ + 13781290, + 27019562 + ], + "remainder": [ + 887559849, + 281470681743360 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281470681743360", + "needed_bits": 887559849, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 202, + "K": 12929, + "d": 65536, + "intervals": { + "active": [ + 27019562, + 874334506 + ], + "back": [ + 874334506, + 887572778 + ], + "front0": [ + 543018, + 13781290 + ], + "front1": [ + 13781290, + 27019562 + ], + "remainder": [ + 887572778, + 281470681743360 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281470681743360", + "needed_bits": 887572778, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 202, + "K": 25855, + "d": 65536, + "intervals": { + "active": [ + 27562454, + 27588309 + ], + "back": [ + 27588309, + 40826581 + ], + "front0": [ + 1085910, + 14324182 + ], + "front1": [ + 14324182, + 27562454 + ], + "remainder": [ + 40826581, + 281470681743360 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281470681743360", + "needed_bits": 40826581, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 25855, + "d": 65536, + "intervals": { + "active": [ + 27562454, + 874779094 + ], + "back": [ + 874779094, + 888017366 + ], + "front0": [ + 1085910, + 14324182 + ], + "front1": [ + 14324182, + 27562454 + ], + "remainder": [ + 888017366, + 281470681743360 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281470681743360", + "needed_bits": 888017366, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 202, + "K": 25855, + "d": 65536, + "intervals": { + "active": [ + 27562454, + 1721969879 + ], + "back": [ + 1721969879, + 1735208151 + ], + "front0": [ + 1085910, + 14324182 + ], + "front1": [ + 14324182, + 27562454 + ], + "remainder": [ + 1735208151, + 281470681743360 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281470681743360", + "needed_bits": 1735208151, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 202, + "K": 25855, + "d": 65536, + "intervals": { + "active": [ + 27562454, + 1721995734 + ], + "back": [ + 1721995734, + 1735234006 + ], + "front0": [ + 1085910, + 14324182 + ], + "front1": [ + 14324182, + 27562454 + ], + "remainder": [ + 1735234006, + 281470681743360 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281470681743360", + "needed_bits": 1735234006, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 202, + "K": 12928, + "d": 262144, + "intervals": { + "active": [ + 106449152, + 106462080 + ], + "back": [ + 106462080, + 159415168 + ], + "front0": [ + 542976, + 53496064 + ], + "front1": [ + 53496064, + 106449152 + ], + "remainder": [ + 159415168, + 281473902968832 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281473902968832", + "needed_bits": 159415168, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 12928, + "d": 262144, + "intervals": { + "active": [ + 106449152, + 1800947968 + ], + "back": [ + 1800947968, + 1853901056 + ], + "front0": [ + 542976, + 53496064 + ], + "front1": [ + 53496064, + 106449152 + ], + "remainder": [ + 1853901056, + 281473902968832 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281473902968832", + "needed_bits": 1853901056, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 202, + "K": 12928, + "d": 262144, + "intervals": { + "active": [ + 106449152, + 3495433856 + ], + "back": [ + 3495433856, + 3548386944 + ], + "front0": [ + 542976, + 53496064 + ], + "front1": [ + 53496064, + 106449152 + ], + "remainder": [ + 3548386944, + 281473902968832 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281473902968832", + "needed_bits": 3548386944, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 202, + "K": 12928, + "d": 262144, + "intervals": { + "active": [ + 106449152, + 3495446784 + ], + "back": [ + 3495446784, + 3548399872 + ], + "front0": [ + 542976, + 53496064 + ], + "front1": [ + 53496064, + 106449152 + ], + "remainder": [ + 3548399872, + 281473902968832 + ], + "row": [ + 0, + 542976 + ] + }, + "n": "281473902968832", + "needed_bits": 3548399872, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 202, + "K": 12929, + "d": 262144, + "intervals": { + "active": [ + 106449194, + 106462123 + ], + "back": [ + 106462123, + 159415211 + ], + "front0": [ + 543018, + 53496106 + ], + "front1": [ + 53496106, + 106449194 + ], + "remainder": [ + 159415211, + 281473902968832 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281473902968832", + "needed_bits": 159415211, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 12929, + "d": 262144, + "intervals": { + "active": [ + 106449194, + 1801079082 + ], + "back": [ + 1801079082, + 1854032170 + ], + "front0": [ + 543018, + 53496106 + ], + "front1": [ + 53496106, + 106449194 + ], + "remainder": [ + 1854032170, + 281473902968832 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281473902968832", + "needed_bits": 1854032170, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 202, + "K": 12929, + "d": 262144, + "intervals": { + "active": [ + 106449194, + 3495696041 + ], + "back": [ + 3495696041, + 3548649129 + ], + "front0": [ + 543018, + 53496106 + ], + "front1": [ + 53496106, + 106449194 + ], + "remainder": [ + 3548649129, + 281473902968832 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281473902968832", + "needed_bits": 3548649129, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 202, + "K": 12929, + "d": 262144, + "intervals": { + "active": [ + 106449194, + 3495708970 + ], + "back": [ + 3495708970, + 3548662058 + ], + "front0": [ + 543018, + 53496106 + ], + "front1": [ + 53496106, + 106449194 + ], + "remainder": [ + 3548662058, + 281473902968832 + ], + "row": [ + 0, + 543018 + ] + }, + "n": "281473902968832", + "needed_bits": 3548662058, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 202, + "K": 25855, + "d": 262144, + "intervals": { + "active": [ + 106992086, + 107017941 + ], + "back": [ + 107017941, + 159971029 + ], + "front0": [ + 1085910, + 54038998 + ], + "front1": [ + 54038998, + 106992086 + ], + "remainder": [ + 159971029, + 281473902968832 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281473902968832", + "needed_bits": 159971029, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 25855, + "d": 262144, + "intervals": { + "active": [ + 106992086, + 3495858646 + ], + "back": [ + 3495858646, + 3548811734 + ], + "front0": [ + 1085910, + 54038998 + ], + "front1": [ + 54038998, + 106992086 + ], + "remainder": [ + 3548811734, + 281473902968832 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281473902968832", + "needed_bits": 3548811734, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 202, + "K": 25855, + "d": 262144, + "intervals": { + "active": [ + 106992086, + 6884699351 + ], + "back": [ + 6884699351, + 6937652439 + ], + "front0": [ + 1085910, + 54038998 + ], + "front1": [ + 54038998, + 106992086 + ], + "remainder": [ + 6937652439, + 281473902968832 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281473902968832", + "needed_bits": 6937652439, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 202, + "K": 25855, + "d": 262144, + "intervals": { + "active": [ + 106992086, + 6884725206 + ], + "back": [ + 6884725206, + 6937678294 + ], + "front0": [ + 1085910, + 54038998 + ], + "front1": [ + 54038998, + 106992086 + ], + "remainder": [ + 6937678294, + 281473902968832 + ], + "row": [ + 0, + 1085910 + ] + }, + "n": "281473902968832", + "needed_bits": 6937678294, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 202, + "K": 12928, + "d": 1048576, + "intervals": { + "active": [ + 424348672, + 424361600 + ], + "back": [ + 424361600, + 636173952 + ], + "front0": [ + 723968, + 212536320 + ], + "front1": [ + 212536320, + 424348672 + ], + "remainder": [ + 636173952, + 281474708275200 + ], + "row": [ + 0, + 723968 + ] + }, + "n": "281474708275200", + "needed_bits": 636173952, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 12928, + "d": 1048576, + "intervals": { + "active": [ + 424348672, + 7202343936 + ], + "back": [ + 7202343936, + 7414156288 + ], + "front0": [ + 723968, + 212536320 + ], + "front1": [ + 212536320, + 424348672 + ], + "remainder": [ + 7414156288, + 281474708275200 + ], + "row": [ + 0, + 723968 + ] + }, + "n": "281474708275200", + "needed_bits": 7414156288, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 202, + "K": 12928, + "d": 1048576, + "intervals": { + "active": [ + 424348672, + 13980326272 + ], + "back": [ + 13980326272, + 14192138624 + ], + "front0": [ + 723968, + 212536320 + ], + "front1": [ + 212536320, + 424348672 + ], + "remainder": [ + 14192138624, + 281474708275200 + ], + "row": [ + 0, + 723968 + ] + }, + "n": "281474708275200", + "needed_bits": 14192138624, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 202, + "K": 12928, + "d": 1048576, + "intervals": { + "active": [ + 424348672, + 13980339200 + ], + "back": [ + 13980339200, + 14192151552 + ], + "front0": [ + 723968, + 212536320 + ], + "front1": [ + 212536320, + 424348672 + ], + "remainder": [ + 14192151552, + 281474708275200 + ], + "row": [ + 0, + 723968 + ] + }, + "n": "281474708275200", + "needed_bits": 14192151552, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 202, + "K": 12929, + "d": 1048576, + "intervals": { + "active": [ + 424348728, + 424361657 + ], + "back": [ + 424361657, + 636174009 + ], + "front0": [ + 724024, + 212536376 + ], + "front1": [ + 212536376, + 424348728 + ], + "remainder": [ + 636174009, + 281474708275200 + ], + "row": [ + 0, + 724024 + ] + }, + "n": "281474708275200", + "needed_bits": 636174009, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 12929, + "d": 1048576, + "intervals": { + "active": [ + 424348728, + 7202868280 + ], + "back": [ + 7202868280, + 7414680632 + ], + "front0": [ + 724024, + 212536376 + ], + "front1": [ + 212536376, + 424348728 + ], + "remainder": [ + 7414680632, + 281474708275200 + ], + "row": [ + 0, + 724024 + ] + }, + "n": "281474708275200", + "needed_bits": 7414680632, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 202, + "K": 12929, + "d": 1048576, + "intervals": { + "active": [ + 424348728, + 13981374903 + ], + "back": [ + 13981374903, + 14193187255 + ], + "front0": [ + 724024, + 212536376 + ], + "front1": [ + 212536376, + 424348728 + ], + "remainder": [ + 14193187255, + 281474708275200 + ], + "row": [ + 0, + 724024 + ] + }, + "n": "281474708275200", + "needed_bits": 14193187255, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 202, + "K": 12929, + "d": 1048576, + "intervals": { + "active": [ + 424348728, + 13981387832 + ], + "back": [ + 13981387832, + 14193200184 + ], + "front0": [ + 724024, + 212536376 + ], + "front1": [ + 212536376, + 424348728 + ], + "remainder": [ + 14193200184, + 281474708275200 + ], + "row": [ + 0, + 724024 + ] + }, + "n": "281474708275200", + "needed_bits": 14193200184, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 202, + "K": 25855, + "d": 1048576, + "intervals": { + "active": [ + 425072584, + 425098439 + ], + "back": [ + 425098439, + 636910791 + ], + "front0": [ + 1447880, + 213260232 + ], + "front1": [ + 213260232, + 425072584 + ], + "remainder": [ + 636910791, + 281474708275200 + ], + "row": [ + 0, + 1447880 + ] + }, + "n": "281474708275200", + "needed_bits": 636910791, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 202, + "K": 25855, + "d": 1048576, + "intervals": { + "active": [ + 425072584, + 13980538824 + ], + "back": [ + 13980538824, + 14192351176 + ], + "front0": [ + 1447880, + 213260232 + ], + "front1": [ + 213260232, + 425072584 + ], + "remainder": [ + 14192351176, + 281474708275200 + ], + "row": [ + 0, + 1447880 + ] + }, + "n": "281474708275200", + "needed_bits": 14192351176, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 202, + "K": 25855, + "d": 1048576, + "intervals": { + "active": [ + 425072584, + 27535979209 + ], + "back": [ + 27535979209, + 27747791561 + ], + "front0": [ + 1447880, + 213260232 + ], + "front1": [ + 213260232, + 425072584 + ], + "remainder": [ + 27747791561, + 281474708275200 + ], + "row": [ + 0, + 1447880 + ] + }, + "n": "281474708275200", + "needed_bits": 27747791561, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 202, + "K": 25855, + "d": 1048576, + "intervals": { + "active": [ + 425072584, + 27536005064 + ], + "back": [ + 27536005064, + 27747817416 + ], + "front0": [ + 1447880, + 213260232 + ], + "front1": [ + 213260232, + 425072584 + ], + "remainder": [ + 27747817416, + 281474708275200 + ], + "row": [ + 0, + 1447880 + ] + }, + "n": "281474708275200", + "needed_bits": 27747817416, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 266, + "K": 17024, + "d": 65536, + "intervals": { + "active": [ + 35580160, + 35597184 + ], + "back": [ + 35597184, + 53029760 + ], + "front0": [ + 715008, + 18147584 + ], + "front1": [ + 18147584, + 35580160 + ], + "remainder": [ + 53029760, + 18446462598732840960 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446462598732840960", + "needed_bits": 53029760, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 17024, + "d": 65536, + "intervals": { + "active": [ + 35580160, + 593422592 + ], + "back": [ + 593422592, + 610855168 + ], + "front0": [ + 715008, + 18147584 + ], + "front1": [ + 18147584, + 35580160 + ], + "remainder": [ + 610855168, + 18446462598732840960 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446462598732840960", + "needed_bits": 610855168, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 266, + "K": 17024, + "d": 65536, + "intervals": { + "active": [ + 35580160, + 1151248000 + ], + "back": [ + 1151248000, + 1168680576 + ], + "front0": [ + 715008, + 18147584 + ], + "front1": [ + 18147584, + 35580160 + ], + "remainder": [ + 1168680576, + 18446462598732840960 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446462598732840960", + "needed_bits": 1168680576, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 266, + "K": 17024, + "d": 65536, + "intervals": { + "active": [ + 35580160, + 1151265024 + ], + "back": [ + 1151265024, + 1168697600 + ], + "front0": [ + 715008, + 18147584 + ], + "front1": [ + 18147584, + 35580160 + ], + "remainder": [ + 1168697600, + 18446462598732840960 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446462598732840960", + "needed_bits": 1168697600, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 266, + "K": 17025, + "d": 65536, + "intervals": { + "active": [ + 35580202, + 35597227 + ], + "back": [ + 35597227, + 53029803 + ], + "front0": [ + 715050, + 18147626 + ], + "front1": [ + 18147626, + 35580202 + ], + "remainder": [ + 53029803, + 18446462598732840960 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446462598732840960", + "needed_bits": 53029803, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 17025, + "d": 65536, + "intervals": { + "active": [ + 35580202, + 593455402 + ], + "back": [ + 593455402, + 610887978 + ], + "front0": [ + 715050, + 18147626 + ], + "front1": [ + 18147626, + 35580202 + ], + "remainder": [ + 610887978, + 18446462598732840960 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446462598732840960", + "needed_bits": 610887978, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 266, + "K": 17025, + "d": 65536, + "intervals": { + "active": [ + 35580202, + 1151313577 + ], + "back": [ + 1151313577, + 1168746153 + ], + "front0": [ + 715050, + 18147626 + ], + "front1": [ + 18147626, + 35580202 + ], + "remainder": [ + 1168746153, + 18446462598732840960 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446462598732840960", + "needed_bits": 1168746153, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 266, + "K": 17025, + "d": 65536, + "intervals": { + "active": [ + 35580202, + 1151330602 + ], + "back": [ + 1151330602, + 1168763178 + ], + "front0": [ + 715050, + 18147626 + ], + "front1": [ + 18147626, + 35580202 + ], + "remainder": [ + 1168763178, + 18446462598732840960 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446462598732840960", + "needed_bits": 1168763178, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 266, + "K": 34047, + "d": 65536, + "intervals": { + "active": [ + 36295126, + 36329173 + ], + "back": [ + 36329173, + 53761749 + ], + "front0": [ + 1429974, + 18862550 + ], + "front1": [ + 18862550, + 36295126 + ], + "remainder": [ + 53761749, + 18446462598732840960 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446462598732840960", + "needed_bits": 53761749, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 34047, + "d": 65536, + "intervals": { + "active": [ + 36295126, + 1151947222 + ], + "back": [ + 1151947222, + 1169379798 + ], + "front0": [ + 1429974, + 18862550 + ], + "front1": [ + 18862550, + 36295126 + ], + "remainder": [ + 1169379798, + 18446462598732840960 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446462598732840960", + "needed_bits": 1169379798, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 266, + "K": 34047, + "d": 65536, + "intervals": { + "active": [ + 36295126, + 2267565271 + ], + "back": [ + 2267565271, + 2284997847 + ], + "front0": [ + 1429974, + 18862550 + ], + "front1": [ + 18862550, + 36295126 + ], + "remainder": [ + 2284997847, + 18446462598732840960 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446462598732840960", + "needed_bits": 2284997847, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 266, + "K": 34047, + "d": 65536, + "intervals": { + "active": [ + 36295126, + 2267599318 + ], + "back": [ + 2267599318, + 2285031894 + ], + "front0": [ + 1429974, + 18862550 + ], + "front1": [ + 18862550, + 36295126 + ], + "remainder": [ + 2285031894, + 18446462598732840960 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446462598732840960", + "needed_bits": 2285031894, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 266, + "K": 17024, + "d": 262144, + "intervals": { + "active": [ + 140175616, + 140192640 + ], + "back": [ + 140192640, + 209922944 + ], + "front0": [ + 715008, + 70445312 + ], + "front1": [ + 70445312, + 140175616 + ], + "remainder": [ + 209922944, + 18446673704965373952 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446673704965373952", + "needed_bits": 209922944, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 17024, + "d": 262144, + "intervals": { + "active": [ + 140175616, + 2371545344 + ], + "back": [ + 2371545344, + 2441275648 + ], + "front0": [ + 715008, + 70445312 + ], + "front1": [ + 70445312, + 140175616 + ], + "remainder": [ + 2441275648, + 18446673704965373952 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446673704965373952", + "needed_bits": 2441275648, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 266, + "K": 17024, + "d": 262144, + "intervals": { + "active": [ + 140175616, + 4602898048 + ], + "back": [ + 4602898048, + 4672628352 + ], + "front0": [ + 715008, + 70445312 + ], + "front1": [ + 70445312, + 140175616 + ], + "remainder": [ + 4672628352, + 18446673704965373952 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446673704965373952", + "needed_bits": 4672628352, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 266, + "K": 17024, + "d": 262144, + "intervals": { + "active": [ + 140175616, + 4602915072 + ], + "back": [ + 4602915072, + 4672645376 + ], + "front0": [ + 715008, + 70445312 + ], + "front1": [ + 70445312, + 140175616 + ], + "remainder": [ + 4672645376, + 18446673704965373952 + ], + "row": [ + 0, + 715008 + ] + }, + "n": "18446673704965373952", + "needed_bits": 4672645376, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 266, + "K": 17025, + "d": 262144, + "intervals": { + "active": [ + 140175658, + 140192683 + ], + "back": [ + 140192683, + 209922987 + ], + "front0": [ + 715050, + 70445354 + ], + "front1": [ + 70445354, + 140175658 + ], + "remainder": [ + 209922987, + 18446673704965373952 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446673704965373952", + "needed_bits": 209922987, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 17025, + "d": 262144, + "intervals": { + "active": [ + 140175658, + 2371676458 + ], + "back": [ + 2371676458, + 2441406762 + ], + "front0": [ + 715050, + 70445354 + ], + "front1": [ + 70445354, + 140175658 + ], + "remainder": [ + 2441406762, + 18446673704965373952 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446673704965373952", + "needed_bits": 2441406762, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 266, + "K": 17025, + "d": 262144, + "intervals": { + "active": [ + 140175658, + 4603160233 + ], + "back": [ + 4603160233, + 4672890537 + ], + "front0": [ + 715050, + 70445354 + ], + "front1": [ + 70445354, + 140175658 + ], + "remainder": [ + 4672890537, + 18446673704965373952 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446673704965373952", + "needed_bits": 4672890537, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 266, + "K": 17025, + "d": 262144, + "intervals": { + "active": [ + 140175658, + 4603177258 + ], + "back": [ + 4603177258, + 4672907562 + ], + "front0": [ + 715050, + 70445354 + ], + "front1": [ + 70445354, + 140175658 + ], + "remainder": [ + 4672907562, + 18446673704965373952 + ], + "row": [ + 0, + 715050 + ] + }, + "n": "18446673704965373952", + "needed_bits": 4672907562, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 266, + "K": 34047, + "d": 262144, + "intervals": { + "active": [ + 140890582, + 140924629 + ], + "back": [ + 140924629, + 210654933 + ], + "front0": [ + 1429974, + 71160278 + ], + "front1": [ + 71160278, + 140890582 + ], + "remainder": [ + 210654933, + 18446673704965373952 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446673704965373952", + "needed_bits": 210654933, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 34047, + "d": 262144, + "intervals": { + "active": [ + 140890582, + 4603498966 + ], + "back": [ + 4603498966, + 4673229270 + ], + "front0": [ + 1429974, + 71160278 + ], + "front1": [ + 71160278, + 140890582 + ], + "remainder": [ + 4673229270, + 18446673704965373952 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446673704965373952", + "needed_bits": 4673229270, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 266, + "K": 34047, + "d": 262144, + "intervals": { + "active": [ + 140890582, + 9066073303 + ], + "back": [ + 9066073303, + 9135803607 + ], + "front0": [ + 1429974, + 71160278 + ], + "front1": [ + 71160278, + 140890582 + ], + "remainder": [ + 9135803607, + 18446673704965373952 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446673704965373952", + "needed_bits": 9135803607, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 266, + "K": 34047, + "d": 262144, + "intervals": { + "active": [ + 140890582, + 9066107350 + ], + "back": [ + 9066107350, + 9135837654 + ], + "front0": [ + 1429974, + 71160278 + ], + "front1": [ + 71160278, + 140890582 + ], + "remainder": [ + 9135837654, + 18446673704965373952 + ], + "row": [ + 0, + 1429974 + ] + }, + "n": "18446673704965373952", + "needed_bits": 9135837654, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 266, + "K": 17024, + "d": 1048576, + "intervals": { + "active": [ + 558795776, + 558812800 + ], + "back": [ + 558812800, + 837734016 + ], + "front0": [ + 953344, + 279874560 + ], + "front1": [ + 279874560, + 558795776 + ], + "remainder": [ + 837734016, + 18446726481523507200 + ], + "row": [ + 0, + 953344 + ] + }, + "n": "18446726481523507200", + "needed_bits": 837734016, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 17024, + "d": 1048576, + "intervals": { + "active": [ + 558795776, + 9484274688 + ], + "back": [ + 9484274688, + 9763195904 + ], + "front0": [ + 953344, + 279874560 + ], + "front1": [ + 279874560, + 558795776 + ], + "remainder": [ + 9763195904, + 18446726481523507200 + ], + "row": [ + 0, + 953344 + ] + }, + "n": "18446726481523507200", + "needed_bits": 9763195904, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 266, + "K": 17024, + "d": 1048576, + "intervals": { + "active": [ + 558795776, + 18409736576 + ], + "back": [ + 18409736576, + 18688657792 + ], + "front0": [ + 953344, + 279874560 + ], + "front1": [ + 279874560, + 558795776 + ], + "remainder": [ + 18688657792, + 18446726481523507200 + ], + "row": [ + 0, + 953344 + ] + }, + "n": "18446726481523507200", + "needed_bits": 18688657792, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 266, + "K": 17024, + "d": 1048576, + "intervals": { + "active": [ + 558795776, + 18409753600 + ], + "back": [ + 18409753600, + 18688674816 + ], + "front0": [ + 953344, + 279874560 + ], + "front1": [ + 279874560, + 558795776 + ], + "remainder": [ + 18688674816, + 18446726481523507200 + ], + "row": [ + 0, + 953344 + ] + }, + "n": "18446726481523507200", + "needed_bits": 18688674816, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 266, + "K": 17025, + "d": 1048576, + "intervals": { + "active": [ + 558795832, + 558812857 + ], + "back": [ + 558812857, + 837734073 + ], + "front0": [ + 953400, + 279874616 + ], + "front1": [ + 279874616, + 558795832 + ], + "remainder": [ + 837734073, + 18446726481523507200 + ], + "row": [ + 0, + 953400 + ] + }, + "n": "18446726481523507200", + "needed_bits": 837734073, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 17025, + "d": 1048576, + "intervals": { + "active": [ + 558795832, + 9484799032 + ], + "back": [ + 9484799032, + 9763720248 + ], + "front0": [ + 953400, + 279874616 + ], + "front1": [ + 279874616, + 558795832 + ], + "remainder": [ + 9763720248, + 18446726481523507200 + ], + "row": [ + 0, + 953400 + ] + }, + "n": "18446726481523507200", + "needed_bits": 9763720248, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 266, + "K": 17025, + "d": 1048576, + "intervals": { + "active": [ + 558795832, + 18410785207 + ], + "back": [ + 18410785207, + 18689706423 + ], + "front0": [ + 953400, + 279874616 + ], + "front1": [ + 279874616, + 558795832 + ], + "remainder": [ + 18689706423, + 18446726481523507200 + ], + "row": [ + 0, + 953400 + ] + }, + "n": "18446726481523507200", + "needed_bits": 18689706423, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 266, + "K": 17025, + "d": 1048576, + "intervals": { + "active": [ + 558795832, + 18410802232 + ], + "back": [ + 18410802232, + 18689723448 + ], + "front0": [ + 953400, + 279874616 + ], + "front1": [ + 279874616, + 558795832 + ], + "remainder": [ + 18689723448, + 18446726481523507200 + ], + "row": [ + 0, + 953400 + ] + }, + "n": "18446726481523507200", + "needed_bits": 18689723448, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 266, + "K": 34047, + "d": 1048576, + "intervals": { + "active": [ + 559749064, + 559783111 + ], + "back": [ + 559783111, + 838704327 + ], + "front0": [ + 1906632, + 280827848 + ], + "front1": [ + 280827848, + 559749064 + ], + "remainder": [ + 838704327, + 18446726481523507200 + ], + "row": [ + 0, + 1906632 + ] + }, + "n": "18446726481523507200", + "needed_bits": 838704327, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 266, + "K": 34047, + "d": 1048576, + "intervals": { + "active": [ + 559749064, + 18410182600 + ], + "back": [ + 18410182600, + 18689103816 + ], + "front0": [ + 1906632, + 280827848 + ], + "front1": [ + 280827848, + 559749064 + ], + "remainder": [ + 18689103816, + 18446726481523507200 + ], + "row": [ + 0, + 1906632 + ] + }, + "n": "18446726481523507200", + "needed_bits": 18689103816, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 266, + "K": 34047, + "d": 1048576, + "intervals": { + "active": [ + 559749064, + 36260582089 + ], + "back": [ + 36260582089, + 36539503305 + ], + "front0": [ + 1906632, + 280827848 + ], + "front1": [ + 280827848, + 559749064 + ], + "remainder": [ + 36539503305, + 18446726481523507200 + ], + "row": [ + 0, + 1906632 + ] + }, + "n": "18446726481523507200", + "needed_bits": 36539503305, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 266, + "K": 34047, + "d": 1048576, + "intervals": { + "active": [ + 559749064, + 36260616136 + ], + "back": [ + 36260616136, + 36539537352 + ], + "front0": [ + 1906632, + 280827848 + ], + "front1": [ + 280827848, + 559749064 + ], + "remainder": [ + 36539537352, + 18446726481523507200 + ], + "row": [ + 0, + 1906632 + ] + }, + "n": "18446726481523507200", + "needed_bits": 36539537352, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 394, + "K": 25216, + "d": 65536, + "intervals": { + "active": [ + 52701440, + 52726656 + ], + "back": [ + 52726656, + 78547840 + ], + "front0": [ + 1059072, + 26880256 + ], + "front1": [ + 26880256, + 52701440 + ], + "remainder": [ + 78547840, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 78547840, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 25216, + "d": 65536, + "intervals": { + "active": [ + 52701440, + 878979328 + ], + "back": [ + 878979328, + 904800512 + ], + "front0": [ + 1059072, + 26880256 + ], + "front1": [ + 26880256, + 52701440 + ], + "remainder": [ + 904800512, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 904800512, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 394, + "K": 25216, + "d": 65536, + "intervals": { + "active": [ + 52701440, + 1705232000 + ], + "back": [ + 1705232000, + 1731053184 + ], + "front0": [ + 1059072, + 26880256 + ], + "front1": [ + 26880256, + 52701440 + ], + "remainder": [ + 1731053184, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 1731053184, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 394, + "K": 25216, + "d": 65536, + "intervals": { + "active": [ + 52701440, + 1705257216 + ], + "back": [ + 1705257216, + 1731078400 + ], + "front0": [ + 1059072, + 26880256 + ], + "front1": [ + 26880256, + 52701440 + ], + "remainder": [ + 1731078400, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 1731078400, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 394, + "K": 25217, + "d": 65536, + "intervals": { + "active": [ + 52701482, + 52726699 + ], + "back": [ + 52726699, + 78547883 + ], + "front0": [ + 1059114, + 26880298 + ], + "front1": [ + 26880298, + 52701482 + ], + "remainder": [ + 78547883, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 78547883, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 25217, + "d": 65536, + "intervals": { + "active": [ + 52701482, + 879012138 + ], + "back": [ + 879012138, + 904833322 + ], + "front0": [ + 1059114, + 26880298 + ], + "front1": [ + 26880298, + 52701482 + ], + "remainder": [ + 904833322, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 904833322, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 394, + "K": 25217, + "d": 65536, + "intervals": { + "active": [ + 52701482, + 1705297577 + ], + "back": [ + 1705297577, + 1731118761 + ], + "front0": [ + 1059114, + 26880298 + ], + "front1": [ + 26880298, + 52701482 + ], + "remainder": [ + 1731118761, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 1731118761, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 394, + "K": 25217, + "d": 65536, + "intervals": { + "active": [ + 52701482, + 1705322794 + ], + "back": [ + 1705322794, + 1731143978 + ], + "front0": [ + 1059114, + 26880298 + ], + "front1": [ + 26880298, + 52701482 + ], + "remainder": [ + 1731143978, + 79226953588444722964369244160 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 1731143978, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 394, + "K": 50431, + "d": 65536, + "intervals": { + "active": [ + 53760470, + 53810901 + ], + "back": [ + 53810901, + 79632085 + ], + "front0": [ + 2118102, + 27939286 + ], + "front1": [ + 27939286, + 53760470 + ], + "remainder": [ + 79632085, + 79226953588444722964369244160 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 79632085, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 50431, + "d": 65536, + "intervals": { + "active": [ + 53760470, + 1706283478 + ], + "back": [ + 1706283478, + 1732104662 + ], + "front0": [ + 2118102, + 27939286 + ], + "front1": [ + 27939286, + 53760470 + ], + "remainder": [ + 1732104662, + 79226953588444722964369244160 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 1732104662, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 394, + "K": 50431, + "d": 65536, + "intervals": { + "active": [ + 53760470, + 3358756055 + ], + "back": [ + 3358756055, + 3384577239 + ], + "front0": [ + 2118102, + 27939286 + ], + "front1": [ + 27939286, + 53760470 + ], + "remainder": [ + 3384577239, + 79226953588444722964369244160 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 3384577239, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 394, + "K": 50431, + "d": 65536, + "intervals": { + "active": [ + 53760470, + 3358806486 + ], + "back": [ + 3358806486, + 3384627670 + ], + "front0": [ + 2118102, + 27939286 + ], + "front1": [ + 27939286, + 53760470 + ], + "remainder": [ + 3384627670, + 79226953588444722964369244160 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79226953588444722964369244160", + "needed_bits": 3384627670, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 394, + "K": 25216, + "d": 262144, + "intervals": { + "active": [ + 207628544, + 207653760 + ], + "back": [ + 207653760, + 310938496 + ], + "front0": [ + 1059072, + 104343808 + ], + "front1": [ + 104343808, + 207628544 + ], + "remainder": [ + 310938496, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 310938496, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 25216, + "d": 262144, + "intervals": { + "active": [ + 207628544, + 3512740096 + ], + "back": [ + 3512740096, + 3616024832 + ], + "front0": [ + 1059072, + 104343808 + ], + "front1": [ + 104343808, + 207628544 + ], + "remainder": [ + 3616024832, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 3616024832, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 394, + "K": 25216, + "d": 262144, + "intervals": { + "active": [ + 207628544, + 6817826432 + ], + "back": [ + 6817826432, + 6921111168 + ], + "front0": [ + 1059072, + 104343808 + ], + "front1": [ + 104343808, + 207628544 + ], + "remainder": [ + 6921111168, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 6921111168, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 394, + "K": 25216, + "d": 262144, + "intervals": { + "active": [ + 207628544, + 6817851648 + ], + "back": [ + 6817851648, + 6921136384 + ], + "front0": [ + 1059072, + 104343808 + ], + "front1": [ + 104343808, + 207628544 + ], + "remainder": [ + 6921136384, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059072 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 6921136384, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 394, + "K": 25217, + "d": 262144, + "intervals": { + "active": [ + 207628586, + 207653803 + ], + "back": [ + 207653803, + 310938539 + ], + "front0": [ + 1059114, + 104343850 + ], + "front1": [ + 104343850, + 207628586 + ], + "remainder": [ + 310938539, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 310938539, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 25217, + "d": 262144, + "intervals": { + "active": [ + 207628586, + 3512871210 + ], + "back": [ + 3512871210, + 3616155946 + ], + "front0": [ + 1059114, + 104343850 + ], + "front1": [ + 104343850, + 207628586 + ], + "remainder": [ + 3616155946, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 3616155946, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 394, + "K": 25217, + "d": 262144, + "intervals": { + "active": [ + 207628586, + 6818088617 + ], + "back": [ + 6818088617, + 6921373353 + ], + "front0": [ + 1059114, + 104343850 + ], + "front1": [ + 104343850, + 207628586 + ], + "remainder": [ + 6921373353, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 6921373353, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 394, + "K": 25217, + "d": 262144, + "intervals": { + "active": [ + 207628586, + 6818113834 + ], + "back": [ + 6818113834, + 6921398570 + ], + "front0": [ + 1059114, + 104343850 + ], + "front1": [ + 104343850, + 207628586 + ], + "remainder": [ + 6921398570, + 79227860282809433936250273792 + ], + "row": [ + 0, + 1059114 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 6921398570, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 394, + "K": 50431, + "d": 262144, + "intervals": { + "active": [ + 208687574, + 208738005 + ], + "back": [ + 208738005, + 312022741 + ], + "front0": [ + 2118102, + 105402838 + ], + "front1": [ + 105402838, + 208687574 + ], + "remainder": [ + 312022741, + 79227860282809433936250273792 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 312022741, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 50431, + "d": 262144, + "intervals": { + "active": [ + 208687574, + 6818779606 + ], + "back": [ + 6818779606, + 6922064342 + ], + "front0": [ + 2118102, + 105402838 + ], + "front1": [ + 105402838, + 208687574 + ], + "remainder": [ + 6922064342, + 79227860282809433936250273792 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 6922064342, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 394, + "K": 50431, + "d": 262144, + "intervals": { + "active": [ + 208687574, + 13428821207 + ], + "back": [ + 13428821207, + 13532105943 + ], + "front0": [ + 2118102, + 105402838 + ], + "front1": [ + 105402838, + 208687574 + ], + "remainder": [ + 13532105943, + 79227860282809433936250273792 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 13532105943, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 394, + "K": 50431, + "d": 262144, + "intervals": { + "active": [ + 208687574, + 13428871638 + ], + "back": [ + 13428871638, + 13532156374 + ], + "front0": [ + 2118102, + 105402838 + ], + "front1": [ + 105402838, + 208687574 + ], + "remainder": [ + 13532156374, + 79227860282809433936250273792 + ], + "row": [ + 0, + 2118102 + ] + }, + "n": "79227860282809433936250273792", + "needed_bits": 13532156374, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 394, + "K": 25216, + "d": 1048576, + "intervals": { + "active": [ + 827689984, + 827715200 + ], + "back": [ + 827715200, + 1240854144 + ], + "front0": [ + 1412096, + 414551040 + ], + "front1": [ + 414551040, + 827689984 + ], + "remainder": [ + 1240854144, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412096 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 1240854144, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 25216, + "d": 1048576, + "intervals": { + "active": [ + 827689984, + 14048136192 + ], + "back": [ + 14048136192, + 14461275136 + ], + "front0": [ + 1412096, + 414551040 + ], + "front1": [ + 414551040, + 827689984 + ], + "remainder": [ + 14461275136, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412096 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 14461275136, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 394, + "K": 25216, + "d": 1048576, + "intervals": { + "active": [ + 827689984, + 27268557184 + ], + "back": [ + 27268557184, + 27681696128 + ], + "front0": [ + 1412096, + 414551040 + ], + "front1": [ + 414551040, + 827689984 + ], + "remainder": [ + 27681696128, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412096 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 27681696128, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 394, + "K": 25216, + "d": 1048576, + "intervals": { + "active": [ + 827689984, + 27268582400 + ], + "back": [ + 27268582400, + 27681721344 + ], + "front0": [ + 1412096, + 414551040 + ], + "front1": [ + 414551040, + 827689984 + ], + "remainder": [ + 27681721344, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412096 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 27681721344, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 394, + "K": 25217, + "d": 1048576, + "intervals": { + "active": [ + 827690040, + 827715257 + ], + "back": [ + 827715257, + 1240854201 + ], + "front0": [ + 1412152, + 414551096 + ], + "front1": [ + 414551096, + 827690040 + ], + "remainder": [ + 1240854201, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412152 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 1240854201, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 25217, + "d": 1048576, + "intervals": { + "active": [ + 827690040, + 14048660536 + ], + "back": [ + 14048660536, + 14461799480 + ], + "front0": [ + 1412152, + 414551096 + ], + "front1": [ + 414551096, + 827690040 + ], + "remainder": [ + 14461799480, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412152 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 14461799480, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 394, + "K": 25217, + "d": 1048576, + "intervals": { + "active": [ + 827690040, + 27269605815 + ], + "back": [ + 27269605815, + 27682744759 + ], + "front0": [ + 1412152, + 414551096 + ], + "front1": [ + 414551096, + 827690040 + ], + "remainder": [ + 27682744759, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412152 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 27682744759, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 394, + "K": 25217, + "d": 1048576, + "intervals": { + "active": [ + 827690040, + 27269631032 + ], + "back": [ + 27269631032, + 27682769976 + ], + "front0": [ + 1412152, + 414551096 + ], + "front1": [ + 414551096, + 827690040 + ], + "remainder": [ + 27682769976, + 79228086956400611679220531200 + ], + "row": [ + 0, + 1412152 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 27682769976, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 394, + "K": 50431, + "d": 1048576, + "intervals": { + "active": [ + 829102024, + 829152455 + ], + "back": [ + 829152455, + 1242291399 + ], + "front0": [ + 2824136, + 415963080 + ], + "front1": [ + 415963080, + 829102024 + ], + "remainder": [ + 1242291399, + 79228086956400611679220531200 + ], + "row": [ + 0, + 2824136 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 1242291399, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 394, + "K": 50431, + "d": 1048576, + "intervals": { + "active": [ + 829102024, + 27269470152 + ], + "back": [ + 27269470152, + 27682609096 + ], + "front0": [ + 2824136, + 415963080 + ], + "front1": [ + 415963080, + 829102024 + ], + "remainder": [ + 27682609096, + 79228086956400611679220531200 + ], + "row": [ + 0, + 2824136 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 27682609096, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 394, + "K": 50431, + "d": 1048576, + "intervals": { + "active": [ + 829102024, + 53709787849 + ], + "back": [ + 53709787849, + 54122926793 + ], + "front0": [ + 2824136, + 415963080 + ], + "front1": [ + 415963080, + 829102024 + ], + "remainder": [ + 54122926793, + 79228086956400611679220531200 + ], + "row": [ + 0, + 2824136 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 54122926793, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 394, + "K": 50431, + "d": 1048576, + "intervals": { + "active": [ + 829102024, + 53709838280 + ], + "back": [ + 53709838280, + 54122977224 + ], + "front0": [ + 2824136, + 415963080 + ], + "front1": [ + 415963080, + 829102024 + ], + "remainder": [ + 54122977224, + 79228086956400611679220531200 + ], + "row": [ + 0, + 2824136 + ] + }, + "n": "79228086956400611679220531200", + "needed_bits": 54122977224, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 522, + "K": 33408, + "d": 65536, + "intervals": { + "active": [ + 69822720, + 69856128 + ], + "back": [ + 69856128, + 104065920 + ], + "front0": [ + 1403136, + 35612928 + ], + "front1": [ + 35612928, + 69822720 + ], + "remainder": [ + 104065920, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 104065920, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 33408, + "d": 65536, + "intervals": { + "active": [ + 69822720, + 1164536064 + ], + "back": [ + 1164536064, + 1198745856 + ], + "front0": [ + 1403136, + 35612928 + ], + "front1": [ + 35612928, + 69822720 + ], + "remainder": [ + 1198745856, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 1198745856, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 522, + "K": 33408, + "d": 65536, + "intervals": { + "active": [ + 69822720, + 2259216000 + ], + "back": [ + 2259216000, + 2293425792 + ], + "front0": [ + 1403136, + 35612928 + ], + "front1": [ + 35612928, + 69822720 + ], + "remainder": [ + 2293425792, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 2293425792, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 522, + "K": 33408, + "d": 65536, + "intervals": { + "active": [ + 69822720, + 2259249408 + ], + "back": [ + 2259249408, + 2293459200 + ], + "front0": [ + 1403136, + 35612928 + ], + "front1": [ + 35612928, + 69822720 + ], + "remainder": [ + 2293459200, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 2293459200, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 522, + "K": 33409, + "d": 65536, + "intervals": { + "active": [ + 69822762, + 69856171 + ], + "back": [ + 69856171, + 104065963 + ], + "front0": [ + 1403178, + 35612970 + ], + "front1": [ + 35612970, + 69822762 + ], + "remainder": [ + 104065963, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 104065963, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 33409, + "d": 65536, + "intervals": { + "active": [ + 69822762, + 1164568874 + ], + "back": [ + 1164568874, + 1198778666 + ], + "front0": [ + 1403178, + 35612970 + ], + "front1": [ + 35612970, + 69822762 + ], + "remainder": [ + 1198778666, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 1198778666, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 522, + "K": 33409, + "d": 65536, + "intervals": { + "active": [ + 69822762, + 2259281577 + ], + "back": [ + 2259281577, + 2293491369 + ], + "front0": [ + 1403178, + 35612970 + ], + "front1": [ + 35612970, + 69822762 + ], + "remainder": [ + 2293491369, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 2293491369, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 522, + "K": 33409, + "d": 65536, + "intervals": { + "active": [ + 69822762, + 2259314986 + ], + "back": [ + 2259314986, + 2293524778 + ], + "front0": [ + 1403178, + 35612970 + ], + "front1": [ + 35612970, + 69822762 + ], + "remainder": [ + 2293524778, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 2293524778, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 522, + "K": 66815, + "d": 65536, + "intervals": { + "active": [ + 71225814, + 71292629 + ], + "back": [ + 71292629, + 105502421 + ], + "front0": [ + 2806230, + 37016022 + ], + "front1": [ + 37016022, + 71225814 + ], + "remainder": [ + 105502421, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 105502421, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 66815, + "d": 65536, + "intervals": { + "active": [ + 71225814, + 2260619734 + ], + "back": [ + 2260619734, + 2294829526 + ], + "front0": [ + 2806230, + 37016022 + ], + "front1": [ + 37016022, + 71225814 + ], + "remainder": [ + 2294829526, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 2294829526, + "new_coordinate_bits": 0, + "selected_top_bits": 32768 + }, + { + "G": 522, + "K": 66815, + "d": 65536, + "intervals": { + "active": [ + 71225814, + 4449946839 + ], + "back": [ + 4449946839, + 4484156631 + ], + "front0": [ + 2806230, + 37016022 + ], + "front1": [ + 37016022, + 71225814 + ], + "remainder": [ + 4484156631, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 4484156631, + "new_coordinate_bits": 0, + "selected_top_bits": 65535 + }, + { + "G": 522, + "K": 66815, + "d": 65536, + "intervals": { + "active": [ + 71225814, + 4450013654 + ], + "back": [ + 4450013654, + 4484223446 + ], + "front0": [ + 2806230, + 37016022 + ], + "front1": [ + 37016022, + 71225814 + ], + "remainder": [ + 4484223446, + 340277174624079928635746076935438991360 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340277174624079928635746076935438991360", + "needed_bits": 4484223446, + "new_coordinate_bits": 0, + "selected_top_bits": 65536 + }, + { + "G": 522, + "K": 33408, + "d": 262144, + "intervals": { + "active": [ + 275081472, + 275114880 + ], + "back": [ + 275114880, + 411954048 + ], + "front0": [ + 1403136, + 138242304 + ], + "front1": [ + 138242304, + 275081472 + ], + "remainder": [ + 411954048, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 411954048, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 33408, + "d": 262144, + "intervals": { + "active": [ + 275081472, + 4653934848 + ], + "back": [ + 4653934848, + 4790774016 + ], + "front0": [ + 1403136, + 138242304 + ], + "front1": [ + 138242304, + 275081472 + ], + "remainder": [ + 4790774016, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 4790774016, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 522, + "K": 33408, + "d": 262144, + "intervals": { + "active": [ + 275081472, + 9032754816 + ], + "back": [ + 9032754816, + 9169593984 + ], + "front0": [ + 1403136, + 138242304 + ], + "front1": [ + 138242304, + 275081472 + ], + "remainder": [ + 9169593984, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 9169593984, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 522, + "K": 33408, + "d": 262144, + "intervals": { + "active": [ + 275081472, + 9032788224 + ], + "back": [ + 9032788224, + 9169627392 + ], + "front0": [ + 1403136, + 138242304 + ], + "front1": [ + 138242304, + 275081472 + ], + "remainder": [ + 9169627392, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403136 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 9169627392, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 522, + "K": 33409, + "d": 262144, + "intervals": { + "active": [ + 275081514, + 275114923 + ], + "back": [ + 275114923, + 411954091 + ], + "front0": [ + 1403178, + 138242346 + ], + "front1": [ + 138242346, + 275081514 + ], + "remainder": [ + 411954091, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 411954091, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 33409, + "d": 262144, + "intervals": { + "active": [ + 275081514, + 4654065962 + ], + "back": [ + 4654065962, + 4790905130 + ], + "front0": [ + 1403178, + 138242346 + ], + "front1": [ + 138242346, + 275081514 + ], + "remainder": [ + 4790905130, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 4790905130, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 522, + "K": 33409, + "d": 262144, + "intervals": { + "active": [ + 275081514, + 9033017001 + ], + "back": [ + 9033017001, + 9169856169 + ], + "front0": [ + 1403178, + 138242346 + ], + "front1": [ + 138242346, + 275081514 + ], + "remainder": [ + 9169856169, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 9169856169, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 522, + "K": 33409, + "d": 262144, + "intervals": { + "active": [ + 275081514, + 9033050410 + ], + "back": [ + 9033050410, + 9169889578 + ], + "front0": [ + 1403178, + 138242346 + ], + "front1": [ + 138242346, + 275081514 + ], + "remainder": [ + 9169889578, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 1403178 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 9169889578, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 522, + "K": 66815, + "d": 262144, + "intervals": { + "active": [ + 276484566, + 276551381 + ], + "back": [ + 276551381, + 413390549 + ], + "front0": [ + 2806230, + 139645398 + ], + "front1": [ + 139645398, + 276484566 + ], + "remainder": [ + 413390549, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 413390549, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 66815, + "d": 262144, + "intervals": { + "active": [ + 276484566, + 9034060246 + ], + "back": [ + 9034060246, + 9170899414 + ], + "front0": [ + 2806230, + 139645398 + ], + "front1": [ + 139645398, + 276484566 + ], + "remainder": [ + 9170899414, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 9170899414, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 522, + "K": 66815, + "d": 262144, + "intervals": { + "active": [ + 276484566, + 17791569111 + ], + "back": [ + 17791569111, + 17928408279 + ], + "front0": [ + 2806230, + 139645398 + ], + "front1": [ + 139645398, + 276484566 + ], + "remainder": [ + 17928408279, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 17928408279, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 522, + "K": 66815, + "d": 262144, + "intervals": { + "active": [ + 276484566, + 17791635926 + ], + "back": [ + 17791635926, + 17928475094 + ], + "front0": [ + 2806230, + 139645398 + ], + "front1": [ + 139645398, + 276484566 + ], + "remainder": [ + 17928475094, + 340281068846723829756467474807685906432 + ], + "row": [ + 0, + 2806230 + ] + }, + "n": "340281068846723829756467474807685906432", + "needed_bits": 17928475094, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 522, + "K": 33408, + "d": 1048576, + "intervals": { + "active": [ + 1096584192, + 1096617600 + ], + "back": [ + 1096617600, + 1643974272 + ], + "front0": [ + 1870848, + 549227520 + ], + "front1": [ + 549227520, + 1096584192 + ], + "remainder": [ + 1643974272, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870848 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 1643974272, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 33408, + "d": 1048576, + "intervals": { + "active": [ + 1096584192, + 18611997696 + ], + "back": [ + 18611997696, + 19159354368 + ], + "front0": [ + 1870848, + 549227520 + ], + "front1": [ + 549227520, + 1096584192 + ], + "remainder": [ + 19159354368, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870848 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 19159354368, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 522, + "K": 33408, + "d": 1048576, + "intervals": { + "active": [ + 1096584192, + 36127377792 + ], + "back": [ + 36127377792, + 36674734464 + ], + "front0": [ + 1870848, + 549227520 + ], + "front1": [ + 549227520, + 1096584192 + ], + "remainder": [ + 36674734464, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870848 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 36674734464, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 522, + "K": 33408, + "d": 1048576, + "intervals": { + "active": [ + 1096584192, + 36127411200 + ], + "back": [ + 36127411200, + 36674767872 + ], + "front0": [ + 1870848, + 549227520 + ], + "front1": [ + 549227520, + 1096584192 + ], + "remainder": [ + 36674767872, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870848 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 36674767872, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 522, + "K": 33409, + "d": 1048576, + "intervals": { + "active": [ + 1096584248, + 1096617657 + ], + "back": [ + 1096617657, + 1643974329 + ], + "front0": [ + 1870904, + 549227576 + ], + "front1": [ + 549227576, + 1096584248 + ], + "remainder": [ + 1643974329, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870904 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 1643974329, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 33409, + "d": 1048576, + "intervals": { + "active": [ + 1096584248, + 18612522040 + ], + "back": [ + 18612522040, + 19159878712 + ], + "front0": [ + 1870904, + 549227576 + ], + "front1": [ + 549227576, + 1096584248 + ], + "remainder": [ + 19159878712, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870904 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 19159878712, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 522, + "K": 33409, + "d": 1048576, + "intervals": { + "active": [ + 1096584248, + 36128426423 + ], + "back": [ + 36128426423, + 36675783095 + ], + "front0": [ + 1870904, + 549227576 + ], + "front1": [ + 549227576, + 1096584248 + ], + "remainder": [ + 36675783095, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870904 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 36675783095, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 522, + "K": 33409, + "d": 1048576, + "intervals": { + "active": [ + 1096584248, + 36128459832 + ], + "back": [ + 36128459832, + 36675816504 + ], + "front0": [ + 1870904, + 549227576 + ], + "front1": [ + 549227576, + 1096584248 + ], + "remainder": [ + 36675816504, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 1870904 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 36675816504, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 522, + "K": 66815, + "d": 1048576, + "intervals": { + "active": [ + 1098454984, + 1098521799 + ], + "back": [ + 1098521799, + 1645878471 + ], + "front0": [ + 3741640, + 551098312 + ], + "front1": [ + 551098312, + 1098454984 + ], + "remainder": [ + 1645878471, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 3741640 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 1645878471, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 522, + "K": 66815, + "d": 1048576, + "intervals": { + "active": [ + 1098454984, + 36128757704 + ], + "back": [ + 36128757704, + 36676114376 + ], + "front0": [ + 3741640, + 551098312 + ], + "front1": [ + 551098312, + 1098454984 + ], + "remainder": [ + 36676114376, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 3741640 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 36676114376, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 522, + "K": 66815, + "d": 1048576, + "intervals": { + "active": [ + 1098454984, + 71158993609 + ], + "back": [ + 71158993609, + 71706350281 + ], + "front0": [ + 3741640, + 551098312 + ], + "front1": [ + 551098312, + 1098454984 + ], + "remainder": [ + 71706350281, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 3741640 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 71706350281, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 522, + "K": 66815, + "d": 1048576, + "intervals": { + "active": [ + 1098454984, + 71159060424 + ], + "back": [ + 71159060424, + 71706417096 + ], + "front0": [ + 3741640, + 551098312 + ], + "front1": [ + 551098312, + 1098454984 + ], + "remainder": [ + 71706417096, + 340282042402384805036647824275747635200 + ], + "row": [ + 0, + 3741640 + ] + }, + "n": "340282042402384805036647824275747635200", + "needed_bits": 71706417096, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 1034, + "K": 66176, + "d": 262144, + "intervals": { + "active": [ + 544893184, + 544959360 + ], + "back": [ + 544959360, + 816016256 + ], + "front0": [ + 2779392, + 273836288 + ], + "front1": [ + 273836288, + 544893184 + ], + "remainder": [ + 816016256, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779392 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 816016256, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 1034, + "K": 66176, + "d": 262144, + "intervals": { + "active": [ + 544893184, + 9218713856 + ], + "back": [ + 9218713856, + 9489770752 + ], + "front0": [ + 2779392, + 273836288 + ], + "front1": [ + 273836288, + 544893184 + ], + "remainder": [ + 9489770752, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779392 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 9489770752, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 1034, + "K": 66176, + "d": 262144, + "intervals": { + "active": [ + 544893184, + 17892468352 + ], + "back": [ + 17892468352, + 18163525248 + ], + "front0": [ + 2779392, + 273836288 + ], + "front1": [ + 273836288, + 544893184 + ], + "remainder": [ + 18163525248, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779392 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 18163525248, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 1034, + "K": 66176, + "d": 262144, + "intervals": { + "active": [ + 544893184, + 17892534528 + ], + "back": [ + 17892534528, + 18163591424 + ], + "front0": [ + 2779392, + 273836288 + ], + "front1": [ + 273836288, + 544893184 + ], + "remainder": [ + 18163591424, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779392 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 18163591424, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 1034, + "K": 66177, + "d": 262144, + "intervals": { + "active": [ + 544893226, + 544959403 + ], + "back": [ + 544959403, + 816016299 + ], + "front0": [ + 2779434, + 273836330 + ], + "front1": [ + 273836330, + 544893226 + ], + "remainder": [ + 816016299, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779434 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 816016299, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 1034, + "K": 66177, + "d": 262144, + "intervals": { + "active": [ + 544893226, + 9218844970 + ], + "back": [ + 9218844970, + 9489901866 + ], + "front0": [ + 2779434, + 273836330 + ], + "front1": [ + 273836330, + 544893226 + ], + "remainder": [ + 9489901866, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779434 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 9489901866, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 1034, + "K": 66177, + "d": 262144, + "intervals": { + "active": [ + 544893226, + 17892730537 + ], + "back": [ + 17892730537, + 18163787433 + ], + "front0": [ + 2779434, + 273836330 + ], + "front1": [ + 273836330, + 544893226 + ], + "remainder": [ + 18163787433, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779434 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 18163787433, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 1034, + "K": 66177, + "d": 262144, + "intervals": { + "active": [ + 544893226, + 17892796714 + ], + "back": [ + 17892796714, + 18163853610 + ], + "front0": [ + 2779434, + 273836330 + ], + "front1": [ + 273836330, + 544893226 + ], + "remainder": [ + 18163853610, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 2779434 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 18163853610, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 1034, + "K": 132351, + "d": 262144, + "intervals": { + "active": [ + 547672534, + 547804885 + ], + "back": [ + 547804885, + 818861781 + ], + "front0": [ + 5558742, + 276615638 + ], + "front1": [ + 276615638, + 547672534 + ], + "remainder": [ + 818861781, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 5558742 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 818861781, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 1034, + "K": 132351, + "d": 262144, + "intervals": { + "active": [ + 547672534, + 17895182806 + ], + "back": [ + 17895182806, + 18166239702 + ], + "front0": [ + 5558742, + 276615638 + ], + "front1": [ + 276615638, + 547672534 + ], + "remainder": [ + 18166239702, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 5558742 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 18166239702, + "new_coordinate_bits": 0, + "selected_top_bits": 131072 + }, + { + "G": 1034, + "K": 132351, + "d": 262144, + "intervals": { + "active": [ + 547672534, + 35242560727 + ], + "back": [ + 35242560727, + 35513617623 + ], + "front0": [ + 5558742, + 276615638 + ], + "front1": [ + 276615638, + 547672534 + ], + "remainder": [ + 35513617623, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 5558742 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 35513617623, + "new_coordinate_bits": 0, + "selected_top_bits": 262143 + }, + { + "G": 1034, + "K": 132351, + "d": 262144, + "intervals": { + "active": [ + 547672534, + 35242693078 + ], + "back": [ + 35242693078, + 35513749974 + ], + "front0": [ + 5558742, + 276615638 + ], + "front1": [ + 276615638, + 547672534 + ], + "remainder": [ + 35513749974, + 115791647525550000827488589184312722123641027794666345134718053606362806484992 + ], + "row": [ + 0, + 5558742 + ] + }, + "n": "115791647525550000827488589184312722123641027794666345134718053606362806484992", + "needed_bits": 35513749974, + "new_coordinate_bits": 0, + "selected_top_bits": 262144 + }, + { + "G": 1034, + "K": 66176, + "d": 1048576, + "intervals": { + "active": [ + 2172161024, + 2172227200 + ], + "back": [ + 2172227200, + 3256454784 + ], + "front0": [ + 3705856, + 1087933440 + ], + "front1": [ + 1087933440, + 2172161024 + ], + "remainder": [ + 3256454784, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705856 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 3256454784, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 1034, + "K": 66176, + "d": 1048576, + "intervals": { + "active": [ + 2172161024, + 36867443712 + ], + "back": [ + 36867443712, + 37951671296 + ], + "front0": [ + 3705856, + 1087933440 + ], + "front1": [ + 1087933440, + 2172161024 + ], + "remainder": [ + 37951671296, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705856 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 37951671296, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 1034, + "K": 66176, + "d": 1048576, + "intervals": { + "active": [ + 2172161024, + 71562660224 + ], + "back": [ + 71562660224, + 72646887808 + ], + "front0": [ + 3705856, + 1087933440 + ], + "front1": [ + 1087933440, + 2172161024 + ], + "remainder": [ + 72646887808, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705856 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 72646887808, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 1034, + "K": 66176, + "d": 1048576, + "intervals": { + "active": [ + 2172161024, + 71562726400 + ], + "back": [ + 71562726400, + 72646953984 + ], + "front0": [ + 3705856, + 1087933440 + ], + "front1": [ + 1087933440, + 2172161024 + ], + "remainder": [ + 72646953984, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705856 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 72646953984, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 1034, + "K": 66177, + "d": 1048576, + "intervals": { + "active": [ + 2172161080, + 2172227257 + ], + "back": [ + 2172227257, + 3256454841 + ], + "front0": [ + 3705912, + 1087933496 + ], + "front1": [ + 1087933496, + 2172161080 + ], + "remainder": [ + 3256454841, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705912 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 3256454841, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 1034, + "K": 66177, + "d": 1048576, + "intervals": { + "active": [ + 2172161080, + 36867968056 + ], + "back": [ + 36867968056, + 37952195640 + ], + "front0": [ + 3705912, + 1087933496 + ], + "front1": [ + 1087933496, + 2172161080 + ], + "remainder": [ + 37952195640, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705912 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 37952195640, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 1034, + "K": 66177, + "d": 1048576, + "intervals": { + "active": [ + 2172161080, + 71563708855 + ], + "back": [ + 71563708855, + 72647936439 + ], + "front0": [ + 3705912, + 1087933496 + ], + "front1": [ + 1087933496, + 2172161080 + ], + "remainder": [ + 72647936439, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705912 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 72647936439, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 1034, + "K": 66177, + "d": 1048576, + "intervals": { + "active": [ + 2172161080, + 71563775032 + ], + "back": [ + 71563775032, + 72648002616 + ], + "front0": [ + 3705912, + 1087933496 + ], + "front1": [ + 1087933496, + 2172161080 + ], + "remainder": [ + 72648002616, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 3705912 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 72648002616, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + }, + { + "G": 1034, + "K": 132351, + "d": 1048576, + "intervals": { + "active": [ + 2175866824, + 2175999175 + ], + "back": [ + 2175999175, + 3260226759 + ], + "front0": [ + 7411656, + 1091639240 + ], + "front1": [ + 1091639240, + 2175866824 + ], + "remainder": [ + 3260226759, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 7411656 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 3260226759, + "new_coordinate_bits": 0, + "selected_top_bits": 1 + }, + { + "G": 1034, + "K": 132351, + "d": 1048576, + "intervals": { + "active": [ + 2175866824, + 71565907912 + ], + "back": [ + 71565907912, + 72650135496 + ], + "front0": [ + 7411656, + 1091639240 + ], + "front1": [ + 1091639240, + 2175866824 + ], + "remainder": [ + 72650135496, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 7411656 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 72650135496, + "new_coordinate_bits": 0, + "selected_top_bits": 524288 + }, + { + "G": 1034, + "K": 132351, + "d": 1048576, + "intervals": { + "active": [ + 2175866824, + 140955816649 + ], + "back": [ + 140955816649, + 142040044233 + ], + "front0": [ + 7411656, + 1091639240 + ], + "front1": [ + 1091639240, + 2175866824 + ], + "remainder": [ + 142040044233, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 7411656 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 142040044233, + "new_coordinate_bits": 0, + "selected_top_bits": 1048575 + }, + { + "G": 1034, + "K": 132351, + "d": 1048576, + "intervals": { + "active": [ + 2175866824, + 140955949000 + ], + "back": [ + 140955949000, + 142040176584 + ], + "front0": [ + 7411656, + 1091639240 + ], + "front1": [ + 1091639240, + 2175866824 + ], + "remainder": [ + 142040176584, + 115791978809374646774550386052594111420862745447897009313272701407525548851200 + ], + "row": [ + 0, + 7411656 + ] + }, + "n": "115791978809374646774550386052594111420862745447897009313272701407525548851200", + "needed_bits": 142040176584, + "new_coordinate_bits": 0, + "selected_top_bits": 1048576 + } + ], + "unchanged_kappa": "646049779721139/500000000000000000" +} diff --git a/research/complementary-fft-reservoirs-validation/CROSS-PLATFORM.json b/research/complementary-fft-reservoirs-validation/CROSS-PLATFORM.json new file mode 100644 index 0000000000..0a4e2ae338 --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/CROSS-PLATFORM.json @@ -0,0 +1,10 @@ +{ + "status": "PASS", + "entire_result_byte_identical": true, + "operators_byte_identical": true, + "capacity_byte_identical": true, + "source_files": 11, + "manifest_sha256": "b170809282d9c79475e22dc7675cefbfd2e0a9a7907e12332a73419780a4b6df", + "linux_python": "3.12.3", + "macos_python": "3.11.15" +} diff --git a/research/complementary-fft-reservoirs-validation/LINUX.json b/research/complementary-fft-reservoirs-validation/LINUX.json new file mode 100644 index 0000000000..71b88f36ef --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/LINUX.json @@ -0,0 +1,9 @@ +{ + "capacity_sha256": "890a90a0fe6563c42e3cc4e3025c3b88dda3a2216f14f070a90d9911c50d8a4c", + "manifest_sha256": "b170809282d9c79475e22dc7675cefbfd2e0a9a7907e12332a73419780a4b6df", + "operators_sha256": "777fca7cc9727ba12d52f4d786d511602fe4cb3e2395465365537ba80372887e", + "python": "3.12.3", + "result_sha256": "88e132ce303fd7991fe14b7c895019b56119ade096e58b8edd006fa0d6bacc26", + "source_sha256": "4869236529a5720a654da1a8224e13e7f6f2153b577c8704006f8b0cd09c6d90", + "status": "PASS_CONDITIONAL_COMPLEMENTARY_FFT_CONTROLS" +} diff --git a/research/complementary-fft-reservoirs-validation/MACOS.json b/research/complementary-fft-reservoirs-validation/MACOS.json new file mode 100644 index 0000000000..29f1d7d355 --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/MACOS.json @@ -0,0 +1,9 @@ +{ + "capacity_sha256": "890a90a0fe6563c42e3cc4e3025c3b88dda3a2216f14f070a90d9911c50d8a4c", + "manifest_sha256": "b170809282d9c79475e22dc7675cefbfd2e0a9a7907e12332a73419780a4b6df", + "operators_sha256": "777fca7cc9727ba12d52f4d786d511602fe4cb3e2395465365537ba80372887e", + "python": "3.11.15", + "result_sha256": "88e132ce303fd7991fe14b7c895019b56119ade096e58b8edd006fa0d6bacc26", + "source_sha256": "4869236529a5720a654da1a8224e13e7f6f2153b577c8704006f8b0cd09c6d90", + "status": "PASS_CONDITIONAL_COMPLEMENTARY_FFT_CONTROLS" +} diff --git a/research/complementary-fft-reservoirs-validation/MANIFEST.json b/research/complementary-fft-reservoirs-validation/MANIFEST.json new file mode 100644 index 0000000000..3b5feb8e5c --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/MANIFEST.json @@ -0,0 +1,9 @@ +{ + "CAPACITY.json": "890a90a0fe6563c42e3cc4e3025c3b88dda3a2216f14f070a90d9911c50d8a4c", + "CROSS-PLATFORM.json": "1bbc4d3e18bfd9fd79abf4d3f280dab4e972a79d2d8fc6c7a65abc5bf894eff6", + "LINUX.json": "bd0a1ff577f3741599840b947786a71bf36c278d5b855232912cef3277917856", + "MACOS.json": "33aebec312ae4973d95eab2aec23ca41fcd1137fa80475c7d56ce4db3022ef40", + "OPERATORS.json": "777fca7cc9727ba12d52f4d786d511602fe4cb3e2395465365537ba80372887e", + "README.md": "1aaf5a33e6dea22a16f3653143e740f640cc894c38118b8516412a881e8d721d", + "RESULT.json": "88e132ce303fd7991fe14b7c895019b56119ade096e58b8edd006fa0d6bacc26" +} diff --git a/research/complementary-fft-reservoirs-validation/OPERATORS.json b/research/complementary-fft-reservoirs-validation/OPERATORS.json new file mode 100644 index 0000000000..6939a4d526 --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/OPERATORS.json @@ -0,0 +1,489 @@ +{ + "basis_columns": 429, + "mutations_rejected": [ + "omitted complementary pass", + "unpaid between-pass relabel", + "wrong twiddle sign", + "unrestored dirty reservoir" + ], + "polynomial_entries": 98080, + "scope": "Actual two-pass polynomial Fourier operators and physical routes; compact-core all-size cost remains a conditional written proof.", + "shape_count": 33, + "shapes": [ + { + "K": 1, + "basis_columns": 4, + "ell": 2, + "full_basis": true, + "global_routes": 3, + "layers": 2, + "lengths": [ + 1, + 1 + ], + "opposite_exact": true, + "polynomial_entries": 16 + }, + { + "K": 1, + "basis_columns": 8, + "ell": 2, + "full_basis": true, + "global_routes": 4, + "layers": 3, + "lengths": [ + 1, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 64 + }, + { + "K": 1, + "basis_columns": 8, + "ell": 2, + "full_basis": true, + "global_routes": 4, + "layers": 3, + "lengths": [ + 2, + 1 + ], + "opposite_exact": true, + "polynomial_entries": 64 + }, + { + "K": 1, + "basis_columns": 16, + "ell": 2, + "full_basis": true, + "global_routes": 5, + "layers": 4, + "lengths": [ + 2, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 256 + }, + { + "K": 1, + "basis_columns": 16, + "ell": 3, + "full_basis": true, + "global_routes": 3, + "layers": 4, + "lengths": [ + 2, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 256 + }, + { + "K": 1, + "basis_columns": 32, + "ell": 3, + "full_basis": true, + "global_routes": 4, + "layers": 5, + "lengths": [ + 2, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 1024 + }, + { + "K": 1, + "basis_columns": 32, + "ell": 3, + "full_basis": true, + "global_routes": 4, + "layers": 5, + "lengths": [ + 3, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 1024 + }, + { + "K": 1, + "basis_columns": 64, + "ell": 3, + "full_basis": true, + "global_routes": 5, + "layers": 6, + "lengths": [ + 3, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 4096 + }, + { + "K": 2, + "basis_columns": 16, + "ell": 3, + "full_basis": true, + "global_routes": 3, + "layers": 4, + "lengths": [ + 2, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 256 + }, + { + "K": 2, + "basis_columns": 32, + "ell": 3, + "full_basis": true, + "global_routes": 4, + "layers": 5, + "lengths": [ + 2, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 1024 + }, + { + "K": 2, + "basis_columns": 32, + "ell": 3, + "full_basis": true, + "global_routes": 4, + "layers": 5, + "lengths": [ + 3, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 1024 + }, + { + "K": 2, + "basis_columns": 64, + "ell": 3, + "full_basis": true, + "global_routes": 5, + "layers": 6, + "lengths": [ + 3, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 4096 + }, + { + "K": 1, + "basis_columns": 5, + "ell": 2, + "full_basis": false, + "global_routes": 3, + "layers": 2, + "lengths": [ + 1, + 1, + 1, + 1 + ], + "opposite_exact": true, + "polynomial_entries": 80 + }, + { + "K": 1, + "basis_columns": 5, + "ell": 2, + "full_basis": false, + "global_routes": 5, + "layers": 4, + "lengths": [ + 2, + 2, + 2, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 1280 + }, + { + "K": 1, + "basis_columns": 5, + "ell": 2, + "full_basis": false, + "global_routes": 5, + "layers": 4, + "lengths": [ + 1, + 2, + 1, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 320 + }, + { + "K": 1, + "basis_columns": 5, + "ell": 3, + "full_basis": false, + "global_routes": 3, + "layers": 4, + "lengths": [ + 2, + 2, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 320 + }, + { + "K": 1, + "basis_columns": 5, + "ell": 3, + "full_basis": false, + "global_routes": 5, + "layers": 6, + "lengths": [ + 3, + 3, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 2560 + }, + { + "K": 1, + "basis_columns": 5, + "ell": 3, + "full_basis": false, + "global_routes": 4, + "layers": 5, + "lengths": [ + 2, + 3, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 640 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 3, + "full_basis": false, + "global_routes": 3, + "layers": 4, + "lengths": [ + 2, + 2, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 320 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 3, + "full_basis": false, + "global_routes": 5, + "layers": 6, + "lengths": [ + 3, + 3, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 2560 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 3, + "full_basis": false, + "global_routes": 4, + "layers": 5, + "lengths": [ + 2, + 3, + 2 + ], + "opposite_exact": true, + "polynomial_entries": 640 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 4, + "full_basis": false, + "global_routes": 3, + "layers": 6, + "lengths": [ + 3, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 320 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 4, + "full_basis": false, + "global_routes": 5, + "layers": 8, + "lengths": [ + 4, + 4 + ], + "opposite_exact": true, + "polynomial_entries": 1280 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 4, + "full_basis": false, + "global_routes": 4, + "layers": 7, + "lengths": [ + 3, + 4 + ], + "opposite_exact": true, + "polynomial_entries": 640 + }, + { + "K": 3, + "basis_columns": 5, + "ell": 4, + "full_basis": false, + "global_routes": 3, + "layers": 6, + "lengths": [ + 3, + 3 + ], + "opposite_exact": true, + "polynomial_entries": 320 + }, + { + "K": 3, + "basis_columns": 5, + "ell": 4, + "full_basis": false, + "global_routes": 5, + "layers": 8, + "lengths": [ + 4, + 4 + ], + "opposite_exact": true, + "polynomial_entries": 1280 + }, + { + "K": 3, + "basis_columns": 5, + "ell": 4, + "full_basis": false, + "global_routes": 4, + "layers": 7, + "lengths": [ + 3, + 4 + ], + "opposite_exact": true, + "polynomial_entries": 640 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 6, + "full_basis": false, + "global_routes": 3, + "layers": 10, + "lengths": [ + 5, + 5 + ], + "opposite_exact": true, + "polynomial_entries": 5120 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 6, + "full_basis": false, + "global_routes": 5, + "layers": 12, + "lengths": [ + 6, + 6 + ], + "opposite_exact": true, + "polynomial_entries": 20480 + }, + { + "K": 2, + "basis_columns": 5, + "ell": 6, + "full_basis": false, + "global_routes": 4, + "layers": 11, + "lengths": [ + 5, + 6 + ], + "opposite_exact": true, + "polynomial_entries": 10240 + }, + { + "K": 3, + "basis_columns": 5, + "ell": 6, + "full_basis": false, + "global_routes": 3, + "layers": 10, + "lengths": [ + 5, + 5 + ], + "opposite_exact": true, + "polynomial_entries": 5120 + }, + { + "K": 3, + "basis_columns": 5, + "ell": 6, + "full_basis": false, + "global_routes": 5, + "layers": 12, + "lengths": [ + 6, + 6 + ], + "opposite_exact": true, + "polynomial_entries": 20480 + }, + { + "K": 3, + "basis_columns": 5, + "ell": 6, + "full_basis": false, + "global_routes": 4, + "layers": 11, + "lengths": [ + 5, + 6 + ], + "opposite_exact": true, + "polynomial_entries": 10240 + } + ], + "status": "PASS" +} diff --git a/research/complementary-fft-reservoirs-validation/README.md b/research/complementary-fft-reservoirs-validation/README.md new file mode 100644 index 0000000000..8c5670236d --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/README.md @@ -0,0 +1,5 @@ +# Verification receipts + +The final source-bound verifier passed on macOS Python 3.11.15 and Linux Python 3.12.3. The full RESULT, OPERATORS and CAPACITY JSON files are byte-identical across platforms. Both receipts bind the same package and upstream manifests. All eleven dependencies also match their pinned Git object bytes at commit 259c68488b7aa8a14cf3fcae7fc499381c9bf729. + +These receipts cover finite polynomial operators, physical slot permutations, complete-field capacity, mutation controls and retained exact inequalities. The asymptotic core/router/guard transfer is the accompanying written conditional proof. They are not a full multiplication-machine run, a new kappa certificate or a CI result. diff --git a/research/complementary-fft-reservoirs-validation/RESULT.json b/research/complementary-fft-reservoirs-validation/RESULT.json new file mode 100644 index 0000000000..c1521823eb --- /dev/null +++ b/research/complementary-fft-reservoirs-validation/RESULT.json @@ -0,0 +1,26 @@ +{ + "basis_columns": 429, + "capacity_mutations": [ + "insufficient opposite-set capacity", + "row and compact-field alias", + "insufficient existing top-layout address volume" + ], + "common_field_layouts": 84, + "maximum_global_routes": 5, + "new_kappa_claim": false, + "operator_mutations": [ + "omitted complementary pass", + "unpaid between-pass relabel", + "wrong twiddle sign", + "unrestored dirty reservoir" + ], + "parameter_witnesses": 4, + "polynomial_entries": 98080, + "precision_controls": 255, + "retained_strict_expressions": 44, + "scope": "Finite operator, layout and arithmetic evidence for the written conditional transfer; not an all-size machine execution or a new multiplication exponent.", + "shapes": 33, + "status": "PASS_CONDITIONAL_COMPLEMENTARY_FFT_CONTROLS", + "top_field_layouts": 168, + "unchanged_reference_kappa": "646049779721139/500000000000000000" +} diff --git a/research/complementary-fft-reservoirs/EXPECTED.json b/research/complementary-fft-reservoirs/EXPECTED.json new file mode 100644 index 0000000000..c1521823eb --- /dev/null +++ b/research/complementary-fft-reservoirs/EXPECTED.json @@ -0,0 +1,26 @@ +{ + "basis_columns": 429, + "capacity_mutations": [ + "insufficient opposite-set capacity", + "row and compact-field alias", + "insufficient existing top-layout address volume" + ], + "common_field_layouts": 84, + "maximum_global_routes": 5, + "new_kappa_claim": false, + "operator_mutations": [ + "omitted complementary pass", + "unpaid between-pass relabel", + "wrong twiddle sign", + "unrestored dirty reservoir" + ], + "parameter_witnesses": 4, + "polynomial_entries": 98080, + "precision_controls": 255, + "retained_strict_expressions": 44, + "scope": "Finite operator, layout and arithmetic evidence for the written conditional transfer; not an all-size machine execution or a new multiplication exponent.", + "shapes": 33, + "status": "PASS_CONDITIONAL_COMPLEMENTARY_FFT_CONTROLS", + "top_field_layouts": 168, + "unchanged_reference_kappa": "646049779721139/500000000000000000" +} diff --git a/research/complementary-fft-reservoirs/LICENSE b/research/complementary-fft-reservoirs/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/complementary-fft-reservoirs/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/complementary-fft-reservoirs/MANIFEST.json b/research/complementary-fft-reservoirs/MANIFEST.json new file mode 100644 index 0000000000..feac34df20 --- /dev/null +++ b/research/complementary-fft-reservoirs/MANIFEST.json @@ -0,0 +1,11 @@ +{ + "EXPECTED.json": "88e132ce303fd7991fe14b7c895019b56119ade096e58b8edd006fa0d6bacc26", + "LICENSE": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "NOTICE.md": "3d0a78cb82ecec4d5a4459149e577d53b2873eb8b46f7c244be2b23bcaf39fd0", + "PROOF.md": "708adab0cd71f06d0827006cf244bf7f586a2b6c0b1eab6de8256a6c59b9df13", + "README.md": "d50c69984b8f6a9f507e49e1ef35d531e1220d09265d7aa132a96097cddeeaf5", + "SOURCE.json": "4869236529a5720a654da1a8224e13e7f6f2153b577c8704006f8b0cd09c6d90", + "code/capacity.py": "0d3466d5b97b2d811d79f3342df0ac61d7e0895723f5b802d827eaf37c8353c8", + "code/operators.py": "b03a0f6c71a98992abc4cf21d8a0c0125b647d9d33e387350a9b26e4d1a0d4f9", + "verify.py": "ad35f745cb4ca9d20596a485d9e32ab353cf290590ab4f04309c57c5b71669ff" +} diff --git a/research/complementary-fft-reservoirs/NOTICE.md b/research/complementary-fft-reservoirs/NOTICE.md new file mode 100644 index 0000000000..d29a9b4141 --- /dev/null +++ b/research/complementary-fft-reservoirs/NOTICE.md @@ -0,0 +1,18 @@ +# Attribution and scope + +New complementary-axis chronology, supplied top-bit layouts, proof and finite +controls: chafreaky with OpenAI Codex assistance, 2026-10-11. Apache-2.0. + +The compact core, complete row fields, dirty restoration and synthetic +transform are taken from the integer-mult-bounds source, including Douglas +Colkitt's compact-control layout notes and the contributors credited there. +The RaD project/hipotures reports supply the balanced layout, independent +polynomial arithmetic reviewer, semantic child guard and arbitrary-coordinate +router. The inherited outer arithmetic is credited to eumemic, icekylinx, +Zhihao Chen and its source authors. The exact source versions are pinned in +SOURCE.json; original files, notices and licenses remain unchanged. + +The operator verifier imports the pinned reviewer's exact polynomial +arithmetic helpers. The new schedule is compared to a separately evaluated +closed Fourier formula. No claim is made that importing a finite checker +formally verifies an asymptotic algorithm or establishes novelty. diff --git a/research/complementary-fft-reservoirs/PROOF.md b/research/complementary-fft-reservoirs/PROOF.md new file mode 100644 index 0000000000..cad42f4402 --- /dev/null +++ b/research/complementary-fft-reservoirs/PROOF.md @@ -0,0 +1,265 @@ +# Complementary reservoirs and routed top bits for the tensor FFT + +## Claim and retained interfaces + +The compact recursive **core**, before processing its reserved axes, acts as +`C` on its active selected bits and identity on every reserved and spectator +coordinate. This is an all-input operator identity; no reservoir content is +assumed zero. Under this existing contract and the accepted arbitrary-coordinate +router, two complementary axis passes remove the individual reserved-axis +term `d^(1-c)` from the complete balanced FFT cost. + +Routing the constant number of exceptional top-bit rounds into supplied +temporary layouts also removes their separate `O(Vd)` bill. This changes a +construction, not the recurrence of a fixed program. It removes the requirement +`q= 64G, q0+2 <= d/8, d >= 4. +``` + +Indeed `Q0 <= q0+3dG/K+2 <= 11d/64 < d/4`, whereas the smaller set has at +least d/4 axes. Fixed positive epsilon,c give these conditions eventually: +`d=Theta(p^epsilon)`, `K=floor(d^c)`, and `G,q0=O(log p)`. +There is no comparison between c and q in this capacity argument. + +The surrounding groups, top-bit prefix, unused opposite-set chunks, and +polynomial suffix are spectators. The active chunks are contiguous. Front +and back fields are disjoint from the row index. Each padded row still +contains the complete within-row rectangle. The original role split and +arbitrary dirty-content restoration proof therefore apply literally. + +## Chronology and exact operator + +First complete **all** Fourier rounds of A, using B as reservoirs. Then +change the global physical layout once and complete all rounds of B, using +A as reservoirs. It is not necessary to alternate layouts at every round. +The tensor Fourier transform factors as + +``` +(F_A tensor I_B)(I_A tensor F_B) = F_A tensor F_B. +``` + +The A-pass output is arbitrary data from the B pass's perspective, including +superpositions in its reservoir indices. The full all-input identity action +on reservoirs, not a zero-input or address-only check, permits this use. +In each pass, process its extra long-axis top bits in one completed fast +layer using the temporary layout below, and then process its common named +levels in decreasing order. At level h, the twiddle uses +only the current branch and lower named slots of axes in that pass: + +``` +E = -sum_(i in pass) [2r/2^(h+1)] b_i sum_(v= q0*K + 3H + f*K. +``` + +The row region, front fields, active fillers and back field are disjoint. +Every other slot is a spectator. Because `epsilon(1+c)<1`, +`dK=o(p)`, while `dG=o(p)` and `q0*K=o(p)`. Hence this condition holds +eventually, uniformly for every f<=d. It enlarges no Fourier axis and adds no +coordinate; the original temporary complete-zero-row padding is retained. +Named low input bits may be fillers or temporary fields: the +completed core is identity on them, for all coefficient arrays. + +Route once to this supplied map, run the original core with f active chunks +and external reservoirs, convert the completed C tensor to the normalized +H tensor, and perform the top twiddle using the original names. Route to the +common-pass layout afterward. For small f the retained stopped core has +its ordinary individual leaf cost, already below the same global layer +bound. Only a constant number of such top layers occurs in the full FFT. +This replaces the old d individual top kernels by one fast layer per pass. + +## Cost of the core and global routing + +Set `chi=tau+(1-beta)max(sigma-tau,0)` and +`leaf=sigma+beta(1-sigma)`. The source core recurrence, including dirty-field +repair and row traffic, is + +``` +F(e) <= (s/W) F(e/m) + O(G^tau e^tau+1), +F(e) = O(e) when e < d^beta. +``` + +Global d,K,G,H and external reservoir fields stay fixed throughout a call. +Base-m decomposition handles an arbitrary active count. Each pass has +Theta(d) active axes. Since its reservoir axes are not individually +processed, the cost is + +``` +O(V (log p)^3 [d^chi + d^leaf + 1]). +``` + +As before, choose `max(tau,sigma,chi)=2 this is no more than the retained +`sqrt(2)*ell*2^-p` error allowance. The output stays in the disk. + +For these runs G and the reservoir capacity tests use the working precision +p+2. All displayed growth estimates and eventual conditions are unchanged +by this fixed shift. In particular `G <= 4 ceil(log2 p)+10` for p>=2. + +The linear semantic guard applies to each core: completed child boundaries +are unchanged, there are at most d selected axes, and external temporary +fields return exactly. Replacing p by p+2 changes neither the O(p) word +width nor any strict power inequality. A normalized layer completes before +the next one starts; unbounded internal intermediates are not passed as +disk inputs. All finite small-parameter cases may use the original fallback. + +## What this removes, and what it does not + +The two occurrences of `c-q>0` in the original assembly are the same +reserved-axis obligation. They can be replaced for this construction by +the external-capacity condition above and its eventual cutoff. The explicit +top-bit/prefix margin is also no longer needed. All other analytic and tape +conditions remain. In particular Gaussian/scalar constraints still cap the +balanced exponent below +`a/(1+a)`. This result makes one geometric dependency independent of the +desired compact saving; it does not increase the presently binding exponent. +The parameter controls reproduce #472's old arithmetic, then change only c +and check the remaining 44 strict expressions. They are a separation witness +between the two reservation rules, **not** a fresh complete finite invoice +or a replacement for #472's unchanged release certificate. + +The capacity verifier supplies a compressed explicit eventual cutoff for any +fixed rational epsilon,c and any integer `B>=ceil(log2 W)`. For +`L=ceil(log2 p)`, d=floor(p^epsilon), and K=floor(d^c), use the conservative +bounds `K>=2^(epsilon*c*L-4)`, `d/8>=2^(epsilon*L-5)`, +`64G<=512L`, and `q0+2<=B(L+2)+2`. It selects L0 by rational inequalities +so the two exponent lower bounds, rounded down, are at least 4 and their +squares dominate the corresponding linear bounds for **every** L>=L0. +The integer induction `2^t>=t^2` for t>=4 proves both capacity inequalities +without expanding 2^L. A positive `1-epsilon(1+c)` and its separately checked +cutoff provide room for the balanced chunks. The examples B=14 and B=4000 +are parameterized capacity controls, not claims that a new complete finite +compiler's row stock has been reconstructed. + +More explicitly, if `n>=A*p` for fixed A>0, top capacity is implied eventually +by +`B(L+2)*p^(epsilon*c) + 3*p^epsilon*(4L+10) + p^(epsilon*(1+c)) <= A*p`. +All three normalized summands tend to zero because their power gaps are +positive. The verifier supplies a separate compressed sufficient cutoff, +including A, for this inequality. This address-volume hypothesis is essential; +an isolated one-bit rectangle does not provide the promised reservoirs. + +If one *also* replaced the separate Gaussian/scalar bounds, the new FFT's +parameter cone would allow epsilon approaching one and c approaching zero +independently of q. That observation identifies remaining work; it is not a +claim that the Gaussian/scalar algorithms or a supplier saving approaching +one have been constructed. + +Finite controls test actual polynomial Fourier operators against the closed +formula, named-slot routing with real pass changes, opposite normalization, +complete external-field inventories, and bad schedules. They do not measure +the asymptotic fixed-tape cost or formally prove the all-size compiler. That +transfer is the written argument above, conditional on the pinned interfaces. + +Prepared by chafreaky with OpenAI Codex assistance. Retained layout and phase +contracts: Douglas Colkitt and the integer-mult-bounds contributors. Balanced +layout, semantic guard, and arbitrary router: the RaD project/hipotures, +Zhihao Chen, icekylinx and the authors credited in the pinned source reports. +No literature priority is claimed. Apache-2.0. diff --git a/research/complementary-fft-reservoirs/README.md b/research/complementary-fft-reservoirs/README.md new file mode 100644 index 0000000000..98ae01a72f --- /dev/null +++ b/research/complementary-fft-reservoirs/README.md @@ -0,0 +1,50 @@ +# Complementary reservoirs and routed top bits + +The current compact FFT individually processes the axes used for its dirty +control fields. This creates the `c>q` reservation condition. Its extra top +bits also carry an `O(Vd)` bill. + +This conditional construction removes both costs: + +- Transform one half of the Fourier axes while the other half supplies + complete dirty reservoirs; then exchange their roles. +- Route each exceptional top-bit round into a virtual chunk layout filled + with existing unselected slots and apply the same fast core there. +- Use at most five global coordinate routes for an entire FFT, rather than + one route per Fourier round. No Fourier axis is enlarged and no coordinate + is added; the original temporary complete-zero-row padding is retained. + +The resulting transform cost is +`O(V [p^tau polylog(p) + ell d^lambda_prime])`, under the source-pinned +compact-core, arbitrary-router, semantic-guard and synthetic-transform +contracts. The proof supplies complete-field capacity, chronology, opposite +normalization, precision and fixed-tape cost arguments. See [PROOF.md](PROOF.md). + +**There is no new kappa claim.** Gaussian and scalar costs still bound the +current composition. This removes two implementation costs that would +otherwise remain even if those separate costs were improved. + +Run with Python 3.11+ and only the standard library: + +```sh +python -B research/complementary-fft-reservoirs/verify.py /absolute/new/output +``` + +The verifier checks 33 actual polynomial Fourier shapes against the closed +formula, 429 basis columns, 98,080 exact polynomial entries, real pass-layout +permutations, normalized opposite compositions, 84 complete common-field +layouts, 168 top-field layouts, and seven mutation controls. Four parameter +rows set c below q while retaining all 44 other strict expressions from the +reference assembly. Compressed rational/integer certificates provide eventual +capacity cutoffs, including the address-volume assumption for top layouts. + +Tiny operator controls do not instantiate the large compact compiler; +capacity controls are separate, and the all-size transfer is the written +conditional argument. These checks do not measure a complete multiplier's +tape time. The unchanged #472 exponent appears only as an arithmetic reference. +They do not replace its source-bound supplier or release certificate. + +All dependencies are pinned by exact file hashes and commit in SOURCE.json. +No pinned source is modified. New implementation and proof by chafreaky with +OpenAI Codex assistance; retained source attribution is in NOTICE.md and the +source texts. No literature priority or Lean certification is claimed. diff --git a/research/complementary-fft-reservoirs/SOURCE.json b/research/complementary-fft-reservoirs/SOURCE.json new file mode 100644 index 0000000000..3173b471c0 --- /dev/null +++ b/research/complementary-fft-reservoirs/SOURCE.json @@ -0,0 +1,16 @@ +{ + "commit": "259c68488b7aa8a14cf3fcae7fc499381c9bf729", + "files": { + "notes/compact-control-layout.tex": "2bc28e50f3eb092195294cafa81213e520f6d42e7935e9905ad8a6199e2a7c87", + "notes/compact-control-movement.tex": "b963c3d2f4e1b7059aa289bb4b4ac89b688920bcf42f5b20d7698cdef0132cc6", + "upstream/build/sections/05-layers.tex": "20cfc8d12099d4e4ed9e3e7eeb6162edd9b6e0e076f24693364cd24377252594", + "upstream/build/sections/06-transforms.tex": "924316e4bc905066281d8f9e8746a49d8829aeb393688608deb1e61c3c87853c", + "references/semantic-bulk/rad20/reports/review-balanced-transform.md": "0c3a5b6f17188205d35cd421ef0c35c71f6111698f497e89da3ef7f870fef862", + "references/semantic-bulk/rad20/reports/review-arbitrary-routing.md": "f18f535a096abae473db71a4ae3f275d0116d7438fb18594d5b160571db670fd", + "references/semantic-bulk/rad20/reports/compact-arbitrary-source-routing.md": "3df36853a181fd5d331811b5c4859a1980116c69f447eb78c40a551ff28cde79", + "references/semantic-bulk/rad20/reports/review-semantic-child-guard.md": "5ded175dbc723df9e45b8a7abc1b729ff77e170d188b0d77102fd8a8f7e0da7e", + "references/semantic-bulk/rad20/code/review_balanced_transform.py": "6a61623a5298bc6a8b259bbdc78f168c45ef36d1b4ab7f5ed41d84ba2d4ad4c6", + "research/e8-r740-replica32/code/engines/outer.py": "c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c", + "research/e8-r715-whole-hosted/EXPECTED.json": "9e91920c50fa72d81916faa17feb19d57568a7bb107a55e0ba3af1025e42e062" + } +} diff --git a/research/complementary-fft-reservoirs/code/capacity.py b/research/complementary-fft-reservoirs/code/capacity.py new file mode 100644 index 0000000000..c5b0a2d4b7 --- /dev/null +++ b/research/complementary-fft-reservoirs/code/capacity.py @@ -0,0 +1,203 @@ +"""Literal complete-field layouts and compressed eventual-capacity bounds.""" +from fractions import Fraction as Q +from pathlib import Path +import importlib.util +import json + +ROOT = Path(__file__).resolve().parents[3] + + +def ceil(x): + return -((-x.numerator)//x.denominator) + + +def clog(value, base): + power, count = 1, 0 + while power < value: + power *= base + count += 1 + return count + + +def fields(d, K, G, m, W, active): + D = d-1 + q0 = clog(W, 2)*clog(2*d, m) + qF, qB = ceil(Q(2*d*G, K)), ceil(Q(d*G, K)) + opposite = D-active + assert opposite >= q0+qF+qB + widths = [('row', q0*K), ('front0', d*G), ('front1', d*G), + ('front_spectator', (opposite-qB-q0)*K-2*d*G), + ('active', active*K), ('back', d*G), + ('back_spectator', qB*K-d*G)] + start, intervals = 0, {} + for name, width in widths: + assert width >= 0 + intervals[name] = (start, start+width) + start += width + assert start == D*K + assert intervals['row'][1] <= intervals['front0'][0] + assert intervals['front1'][1] <= intervals['active'][0] + assert intervals['active'][1] <= intervals['back'][0] + assert q0*K >= clog(W, 2)*clog(d, m) + result = dict(d=d, K=K, G=G, m=m, W=W, active=active, opposite=opposite, + q0=q0, qF=qF, qB=qB, intervals=intervals, + address_bits=start, new_coordinate_bits=0) + audit_fields(result) + return result + + +def audit_fields(row): + intervals = row['intervals'] + occupied = sorted((a, b, name) for name, (a, b) in intervals.items() if a != b) + assert occupied[0][0] == 0 and occupied[-1][1] == row['address_bits'] + assert all(a < b for a, b, name in occupied) + assert all(left[1] == right[0] for left, right in zip(occupied, occupied[1:])) + assert row['address_bits'] == (row['d']-1)*row['K'] and row['new_coordinate_bits'] == 0 + for name in ('front0', 'front1', 'back'): + a, b = intervals[name] + assert b-a == row['d']*row['G'] + assert intervals['active'][1]-intervals['active'][0] == row['active']*row['K'] + assert intervals['row'][1] <= intervals['front0'][0] + assert intervals['front1'][1] <= intervals['active'][0] + assert intervals['active'][1] <= intervals['back'][0] + assert intervals['row'][1]-intervals['row'][0] >= clog(row['W'], 2)*clog(row['d'], row['m']) + + +def top_fields(n, d, K, G, m, W, f): + assert 0 <= f <= d + row = clog(W, 2)*clog(2*d, m)*K + needed = row+3*d*G+f*K + assert needed <= n + intervals, start = {}, 0 + for name, width in [('row', row), ('front0', d*G), ('front1', d*G), + ('active', f*K), ('back', d*G), ('remainder', n-needed)]: + intervals[name] = (start, start+width) + start += width + assert start == n and sum(b-a for a, b in intervals.values()) == n + assert all(b >= a for a, b in intervals.values()) + assert needed-f <= n-f # all fillers and reservoirs are unselected slots + return dict(n=str(n), d=d, K=K, G=G, selected_top_bits=f, + needed_bits=needed, intervals=intervals, new_coordinate_bits=0) + + +def cutoff(eps, c, B, A=Q(1, 16)): + """For every L=ceil(log2 p)>=L0, with d=floor(p^eps). + + K=floor(d^c) >= 2^(eps*c*L-4), d/8 >= 2^(eps*L-5). + For integer t>=4, 2^t>=t^2 (base 4 and induction). The rational + inequalities below dominate the required linear functions of L. + They establish a uniform eventual bound, not only one sampled p. + """ + assert 0 < eps < 1 and 0 < c < 1 and eps*(1+c) < 1 and B >= 1 + e = eps*c + gap = 1-eps*(1+c) + assert A > 0 + requirements = [Q(32)/e, Q(4096)/(e*e), Q(16*(3*B+2))/(eps*eps), + 1+Q(8)/gap, Q(32)] + top = [(1-e, 9*B/A), (1-eps, Q(126)/A), (gap, Q(3)/A)] + for power_gap, coefficient in top: + assert power_gap > 0 + requirements += [16/power_gap, 16*coefficient/power_gap**2] + L = ceil(max(requirements)) + assert e*L >= 32 and e*e*L/4 >= 1024 + assert eps*L >= 32 and eps*eps*L/4 >= 4*(3*B+2) + assert gap*(L-1) >= 8 + # Finite compressed consistency control at the cutoff. No 2^L expanded. + t = (e*L).numerator//(e*L).denominator-4 + u = (eps*L).numerator//(eps*L).denominator-5 + assert t >= 4 and t*t >= 512*L + assert u >= 4 and u*u >= B*(L+2)+2 + top_controls = [] + for power_gap, coefficient in top: + z = (power_gap*(L-1)).numerator//(power_gap*(L-1)).denominator + assert z >= 4 and z*z >= coefficient*L + assert power_gap**2*L/4 >= coefficient and power_gap*L >= 16 + top_controls.append(dict(power_gap=str(power_gap), linear_coefficient=str(coefficient), + compressed_exponent=str(z))) + return dict(c=str(c), epsilon=str(eps), ceil_log2_p_cutoff=str(L), + row_log2_W_upper=B, K_log2_lower=str(t), + d_over8_log2_lower=str(u), geometry_gap=str(gap), + address_volume_lower=str(A)+' * p', top_capacity=top_controls, + uniform_argument='2^t >= t^2 for integer t>=4; linear t lower bounds and positive geometry gap hold for every L>=L0') + + +def run(): + layouts, top_layouts = [], [] + for logp in (48, 64, 96, 128, 256): + G = 4*(logp+1)+6 + for logd in (16, 18, 20): + d = 1 << logd + K = 64*G + if K >= d or (d-1)*K >= 1 << logp: + continue + q0 = clog(10178, 2)*clog(2*d, 89) + assert q0+2 <= Q(d, 8) + for Kactual in (K, K+1, 2*K-1): + for active in ((d-1)//2, (d-1)-(d-1)//2): + row = fields(d, Kactual, G, 89, 10178, active) + assert row['q0']+row['qF']+row['qB'] <= Q(11*d, 64) + layouts.append(row) + for f in (1, d//2, d-1, d): + n = (d-1)*((1 << logp)//d) + top_layouts.append(top_fields(n, d, Kactual, G, 89, 10178, f)) + rejected = [] + try: + fields(64, 8, 16, 89, 10178, 32) + except AssertionError: + rejected.append('insufficient opposite-set capacity') + else: + raise AssertionError('bad capacity accepted') + example = layouts[0] + corrupted = dict(example, intervals=dict(example['intervals'])) + corrupted['intervals']['front0'] = corrupted['intervals']['row'] + try: + audit_fields(corrupted) + except AssertionError: + rejected.append('row and compact-field alias') + else: + raise AssertionError('aliased fields accepted') + try: + top_fields(128, 64, 16, 16, 89, 10178, 32) + except AssertionError: + rejected.append('insufficient existing top-layout address volume') + else: + raise AssertionError('top volume expansion accepted') + + source = ROOT/'research/e8-r740-replica32/code/engines/outer.py' + spec = importlib.util.spec_from_file_location('retained_outer_engine', source) + outer = importlib.util.module_from_spec(spec) + spec.loader.exec_module(outer) + prior = json.loads((ROOT/'research/e8-r715-whole-hosted/EXPECTED.json').read_text()) + a = Q(prior['strict_outer_constraints']['bit_positive']) + b, k = Q(prior['complex_lower']), Q(prior['kappa']) + eta = beta = Q(1, 10**18) + bridge = {'semantic': {'C0': {'base': 2, 'exponent': 210000}, 'strict_literal_gap': 1}, + 'rows': {'degree_gap': Q(10**6)-Q(51*20161, 25)}} + old = outer.assembly(a, b, bridge, k, eta, beta) + assert {n: str(v) for n, v in old['strict_constraints'].items()} == prior['strict_outer_constraints'] + eps, q = old['parameters']['epsilon'], old['parameters']['q'] + witnesses = [] + for divisor in (2, 4, 16, 1024): + c = q/divisor + slacks = dict(old['strict_constraints']) + slacks.update(c_positive=c, c_below_one=1-c, q_below_reservations=c-q, + compact_reservations=c-q, K_geometry=1-eps*(1+c), + K_dominates_log=eps*c) + failed = sorted(n for n, v in slacks.items() if v <= 0) + assert failed == ['compact_reservations', 'q_below_reservations'] + removed = failed + ['balanced_prefix_above_kappa'] + retained = {n: v for n, v in slacks.items() if n not in removed} + assert len(retained) == 44 and all(v > 0 for v in retained.values()) + witnesses.append(dict(q=str(q), c=str(c), unchanged_kappa=str(k), + old_rejections=failed, removed_obligations=removed, + retained_strict_count=44, + capacity_cutoffs=[cutoff(eps, c, B) for B in (14, 4000)])) + for ell in range(2, 257): + assert Q(2*ell, 4)+1 <= ell + # Still no improvement to the currently binding seven exponent margins. + assert max(Q(w['unchanged_kappa']) for w in witnesses) == k + return dict(status='PASS', literal_layout_count=len(layouts), layouts=layouts, + top_layout_count=len(top_layouts), top_layouts=top_layouts, + mutations_rejected=rejected, parameter_witnesses=witnesses, + unchanged_kappa=str(k), precision_inequalities_checked=255, + scope='Capacity and retained-constraint arithmetic; no new multiplication exponent or machine-time measurement.') diff --git a/research/complementary-fft-reservoirs/code/operators.py b/research/complementary-fft-reservoirs/code/operators.py new file mode 100644 index 0000000000..b61baaebb7 --- /dev/null +++ b/research/complementary-fft-reservoirs/code/operators.py @@ -0,0 +1,175 @@ +"""Exact polynomial FFT controls for two complementary physical passes. + +The pinned reviewer supplies only arithmetic primitives. The schedule and +physical permutations here are new; the comparator is the closed Fourier sum. +Tiny operator layouts do not simulate the asymptotically large compact core. +""" +from fractions import Fraction as Q +from itertools import product +import importlib.util +from pathlib import Path + +ROOT = Path(__file__).resolve().parents[3] +SOURCE = ROOT / 'references/semantic-bulk/rad20/code/review_balanced_transform.py' +spec = importlib.util.spec_from_file_location('pinned_polynomial_arithmetic', SOURCE) +poly = importlib.util.module_from_spec(spec) +spec.loader.exec_module(poly) + + +def masks(slots): + assert len(slots) == len(set(slots)) + return {slot: 1 << (len(slots)-1-j) for j, slot in enumerate(slots)} + + +def layout(ell, K, lengths, active): + widths, _, _ = poly.shape(ell, K, lengths) + other = [i for i in range(len(lengths)) if i not in active] + # Small Fourier controls need an actual permutation, not large reservoirs. + # Literal complete-field capacity is checked independently in capacity.py. + cut = (len(other)+1)//2 + order = other[:cut] + list(active) + other[cut:] + slots = [(i, ell-1) for i, a in enumerate(lengths) if a == ell] + low = ell-1 + for width in widths: + slots += [(i, h) for i in order for h in range(low-1, low-width-1, -1)] + low -= width + assert low == 0 and len(slots) == sum(lengths) + return masks(slots) + + +def route(values, old, new): + assert old.keys() == new.keys() + output = [None] * len(values) + for index, value in enumerate(values): + target = sum(new[slot] for slot, bit in old.items() if index & bit) + assert output[target] is None + output[target] = value + assert all(x is not None for x in output) + return output + + +def top_layout(ell, K, lengths, axes): + selected = [(i, ell-1) for i in axes if lengths[i] == ell] + unused = [(i, h) for i, a in enumerate(lengths) for h in range(a-1, -1, -1) + if (i, h) not in selected] + needed = len(selected)*(K-1) + assert len(unused) >= needed + active = [] + for j, slot in enumerate(selected): + active += unused[j*(K-1):(j+1)*(K-1)] + [slot] + rest = unused[needed:] + cut = len(rest)//2 + slots = rest[:cut] + active + rest[cut:] + assert len(slots) == sum(lengths) + assert all(slots[cut+j*K+K-1] == slot for j, slot in enumerate(selected)) + return masks(slots) + + +def schedule(ell, K, lengths, mutation=None): + original = masks([(i, h) for i, a in enumerate(lengths) for h in range(a-1, -1, -1)]) + D = len(lengths) + groups = [list(range(D//2)), list(range(D//2, D))] + current = original + steps = [] + for number, axes in enumerate(groups): + if mutation == 'omitted complementary pass' and number == 1: + continue + top_axes = [i for i in axes if lengths[i] == ell] + if top_axes: + target = top_layout(ell, K, lengths, axes) + if not (mutation == 'unpaid between-pass relabel' and number == 1): + steps.append(('route', current, target)) + current = target + steps.append(('layer', ell-1, top_axes, current)) + steps.append(('twiddle', ell-1, top_axes, current, + mutation == 'wrong twiddle sign' and number == 1)) + target = layout(ell, K, lengths, axes) + if not (mutation == 'unpaid between-pass relabel' and number == 1 and not top_axes): + steps.append(('route', current, target)) + current = target + rounds = [(h, axes) for h in range(ell-2, -1, -1)] + for h, selected in rounds: + if selected: + steps.append(('layer', h, selected, current)) + steps.append(('twiddle', h, selected, current, + mutation == 'wrong twiddle sign' and number == 1)) + if mutation == 'unrestored dirty reservoir' and number == 0: + steps.append(('xor', current[groups[1][0], 0])) + steps.append(('route', current, original)) + return original, steps + + +def apply(values, steps, r, opposite=False): + for op in reversed(steps) if opposite else steps: + if op[0] == 'route': + _, old, new = op + values = route(values, new, old) if opposite else route(values, old, new) + elif op[0] == 'layer': + poly.layer(values, *op[1:]) + elif op[0] == 'twiddle': + _, h, axes, current, wrong_sign = op + poly.twiddle(values, h, axes, current, r, opposite != wrong_sign) + elif op[0] == 'xor': + values = [values[j ^ op[1]] for j in range(len(values))] + else: + raise AssertionError(op) + return values + + +def control(ell, K, lengths, exhaustive): + original, steps = schedule(ell, K, lengths) + M = 1 << sum(lengths) + r = 1 << ell + bases = range(M) if exhaustive else sorted({0, 1, M//3, M//2, M-1}) + entries = 0 + for basis in bases: + coordinates = poly.coordinates(basis, lengths) + target = poly.encoded(coordinates, lengths, original) + values = [{} for _ in range(M)] + values[target] = {0: Q(1)} + values = apply(values, steps, r) + for frequency in range(M): + js = poly.coordinates(frequency, lengths) + exponent = -sum((2*r//(1 << a))*j*k + for a, j, k in zip(lengths, js, coordinates)) % (2*r) + expected = {exponent % r: Q(-1 if exponent >= r else 1, M)} + assert values[poly.encoded(js, lengths, original, True)] == expected + entries += 1 + values = apply(values, steps, r, opposite=True) + assert values[target] == {0: Q(1, M)} + assert all(not value for j, value in enumerate(values) if j != target) + return dict(ell=ell, K=K, lengths=lengths, full_basis=exhaustive, + basis_columns=len(bases), polynomial_entries=entries, + global_routes=sum(op[0] == 'route' for op in steps), + layers=sum(op[0] == 'layer' for op in steps), + opposite_exact=True) + + +def run(): + rows = [] + for ell in (2, 3): + for K in range(1, ell): + for flags in product((0, 1), repeat=2): + rows.append(control(ell, K, [ell-1+x for x in flags], True)) + for ell, K, D in [(2, 1, 4), (3, 1, 3), (3, 2, 3), (4, 2, 2), + (4, 3, 2), (6, 2, 2), (6, 3, 2)]: + for flags in [(0,)*D, (1,)*D, tuple(i % 2 for i in range(D))]: + rows.append(control(ell, K, [ell-1+x for x in flags], False)) + assert all(3 <= row['global_routes'] <= 5 and row['layers'] <= 2*row['ell'] for row in rows) + rejected = [] + ell, K, lengths = 3, 1, [3, 2, 3] + _, good = schedule(ell, K, lengths) + M = 1 << sum(lengths) + values = [{j % 8: Q((j % 7)-3, 8)} for j in range(M)] + expected = apply(values, good, 8) + for name in ['omitted complementary pass', 'unpaid between-pass relabel', + 'wrong twiddle sign', 'unrestored dirty reservoir']: + _, bad = schedule(ell, K, lengths, name) + actual = apply([{j % 8: Q((j % 7)-3, 8)} for j in range(M)], bad, 8) + assert actual != expected, name + rejected.append(name) + return dict(status='PASS', shapes=rows, shape_count=len(rows), + basis_columns=sum(x['basis_columns'] for x in rows), + polynomial_entries=sum(x['polynomial_entries'] for x in rows), + mutations_rejected=rejected, + scope='Actual two-pass polynomial Fourier operators and physical routes; compact-core all-size cost remains a conditional written proof.') diff --git a/research/complementary-fft-reservoirs/verify.py b/research/complementary-fft-reservoirs/verify.py new file mode 100644 index 0000000000..a11d501dd7 --- /dev/null +++ b/research/complementary-fft-reservoirs/verify.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +"""Replay finite controls for the conditional complementary-reservoir FFT.""" +import argparse +import hashlib +import json +from pathlib import Path +import sys + +assert __debug__, 'verification requires assertions' +ROOT = Path(__file__).resolve().parent +REPO = ROOT.parents[1] +sys.path.insert(0, str(ROOT/'code')) +sha = lambda p: hashlib.sha256(p.read_bytes()).hexdigest() +read = lambda p: json.loads(p.read_text()) + + +def integrity(): + actual = {p.relative_to(ROOT).as_posix(): sha(p) for p in ROOT.rglob('*') + if p.is_file() and '__pycache__' not in p.parts and p.name != 'MANIFEST.json'} + assert actual == read(ROOT/'MANIFEST.json') + for name, digest in read(ROOT/'SOURCE.json')['files'].items(): + assert sha(REPO/name) == digest, name + + +def main(): + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument('output', type=Path) + out = ap.parse_args().output.resolve() + assert not out.exists() and not out.is_relative_to(ROOT) + integrity() + from operators import run as operators + from capacity import run as capacity + out.mkdir(parents=True) + op, cap = operators(), capacity() + result = dict(status='PASS_CONDITIONAL_COMPLEMENTARY_FFT_CONTROLS', + shapes=op['shape_count'], basis_columns=op['basis_columns'], + polynomial_entries=op['polynomial_entries'], + common_field_layouts=cap['literal_layout_count'], + top_field_layouts=cap['top_layout_count'], + operator_mutations=op['mutations_rejected'], + capacity_mutations=cap['mutations_rejected'], + parameter_witnesses=len(cap['parameter_witnesses']), + retained_strict_expressions=44, + maximum_global_routes=5, + precision_controls=cap['precision_inequalities_checked'], + unchanged_reference_kappa=cap['unchanged_kappa'], + new_kappa_claim=False, + scope='Finite operator, layout and arithmetic evidence for the written conditional transfer; not an all-size machine execution or a new multiplication exponent.') + assert result == read(ROOT/'EXPECTED.json') + integrity() + for name, value in [('OPERATORS.json', op), ('CAPACITY.json', cap), ('RESULT.json', result)]: + (out/name).write_text(json.dumps(value, indent=2, sort_keys=True)+'\n') + receipt = dict(status=result['status'], python=sys.version.split()[0], + manifest_sha256=sha(ROOT/'MANIFEST.json'), source_sha256=sha(ROOT/'SOURCE.json'), + result_sha256=sha(out/'RESULT.json'), operators_sha256=sha(out/'OPERATORS.json'), + capacity_sha256=sha(out/'CAPACITY.json')) + (out/'RECEIPT.json').write_text(json.dumps(receipt, indent=2, sort_keys=True)+'\n') + print(json.dumps(receipt, indent=2)) + + +if __name__ == '__main__': + main() diff --git a/research/cross-family-residual-obstruction/EXPECTED.json b/research/cross-family-residual-obstruction/EXPECTED.json new file mode 100644 index 0000000000..149851fe5c --- /dev/null +++ b/research/cross-family-residual-obstruction/EXPECTED.json @@ -0,0 +1,424 @@ +{ + "status": "PASS_CROSS_FAMILY_ROUTE_OBSTRUCTION", + "reviewed_pr": 448, + "reviewed_head": "9b966d8188e1cadd00aa834078ee6a8742a9d9b4", + "bit": [ + { + "q": 3, + "m": 2, + "ranks": [ + 1, + 1 + ], + "dimension": 162, + "whole_trace": 90, + "split_trace": 54, + "same_family_identity": true, + "not_similar_by_trace": true, + "distinct_column": { + "input": [ + 0, + [ + 0, + 0, + 0, + 1 + ] + ], + "whole": [ + 0, + [ + 0, + 1, + 0, + 0 + ] + ], + "split": [ + 0, + [ + 0, + 0, + 0, + 1 + ] + ] + }, + "whole_sha256": "5922ff9046806e99dccc93100cc1e70b6652dea3cae3fba29716c2f8b548af93", + "split_sha256": "94186aaf90f78695c762198e7efdb84eafe12bb782101c8f58f968e6f220c887" + }, + { + "q": 3, + "m": 3, + "ranks": [ + 1, + 1 + ], + "dimension": 1458, + "whole_trace": 810, + "split_trace": 486, + "same_family_identity": true, + "not_similar_by_trace": true, + "distinct_column": { + "input": [ + 0, + [ + 0, + 0, + 0, + 0, + 1, + 0 + ] + ], + "whole": [ + 0, + [ + 0, + 1, + 0, + 0, + 0, + 0 + ] + ], + "split": [ + 0, + [ + 0, + 0, + 0, + 0, + 1, + 0 + ] + ] + }, + "whole_sha256": "a2c7f305cfbbbf85a968b2a4a5ef0aec25e7611cefed9663fe55a07ac070648c", + "split_sha256": "0d323074b120550e07b47c8d09d0c36598d9dc2ad9b4515a64a2217e723bdfc4" + }, + { + "q": 3, + "m": 3, + "ranks": [ + 1, + 2 + ], + "dimension": 1458, + "whole_trace": 756, + "split_trace": 324, + "same_family_identity": true, + "not_similar_by_trace": true, + "distinct_column": { + "input": [ + 0, + [ + 0, + 0, + 0, + 0, + 0, + 1 + ] + ], + "whole": [ + 0, + [ + 0, + 0, + 1, + 0, + 0, + 0 + ] + ], + "split": [ + 0, + [ + 0, + 0, + 0, + 0, + 0, + 1 + ] + ] + }, + "whole_sha256": "1b8041d497b9cd4c7a8591dd9d044c97a7555cb81abc4ba523dfd47cf388a761", + "split_sha256": "6326e20aea48c078df46393f365b9cbe1be0cb8244b13f1dc68fec4f29426e16" + } + ], + "complex": [ + { + "m": 2, + "ranks": [ + 1, + 1 + ], + "dimension": 8, + "whole_trace_gaussian_integer": [ + 4, + 2 + ], + "split_trace_gaussian_integer": [ + 4, + 4 + ], + "same_family_identity": true, + "not_similar_by_trace": true + }, + { + "m": 3, + "ranks": [ + 1, + 2 + ], + "dimension": 16, + "whole_trace_gaussian_integer": [ + 6, + 2 + ], + "split_trace_gaussian_integer": [ + 4, + 8 + ], + "same_family_identity": true, + "not_similar_by_trace": true + } + ], + "actual_bit_rank8": [ + { + "m": 64, + "q": 3, + "ranks": [ + 1, + 7 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "3935452556812604350804863826626035037011931624307893923018190", + "difference": "7856529031225893251926422214615993233706011443595485037185172" + }, + { + "m": 64, + "q": 3, + "ranks": [ + 2, + 6 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "1326193601336850233284926714178088519321829013122934116523938", + "difference": "10465787986701647369446359327063939751396114054780444843679424" + }, + { + "m": 64, + "q": 3, + "ranks": [ + 3, + 5 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "485192780976896426811558553967593360727498419435219798728270", + "difference": "11306788807061601175919727487274434909990444648468159161475092" + }, + { + "m": 64, + "q": 3, + "ranks": [ + 4, + 4 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "291115668586137856086935132380556016436499051661131879236962", + "difference": "11500865919452359746644350908861472254281444016242247080966400" + }, + { + "m": 64, + "q": 3, + "ranks": [ + 5, + 3 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "485192780976896426811558553967593360727498419435219798728270", + "difference": "11306788807061601175919727487274434909990444648468159161475092" + }, + { + "m": 64, + "q": 3, + "ranks": [ + 6, + 2 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "1326193601336850233284926714178088519321829013122934116523938", + "difference": "10465787986701647369446359327063939751396114054780444843679424" + }, + { + "m": 64, + "q": 3, + "ranks": [ + 7, + 1 + ], + "whole_trace": "11791981588038497602731286041242028270717943067903378960203362", + "split_trace": "3935452556812604350804863826626035037011931624307893923018190", + "difference": "7856529031225893251926422214615993233706011443595485037185172" + } + ], + "actual_complex_rank9": [ + { + "m": 73, + "ranks": [ + 1, + 8 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + 5312662293228350865408, + 4722366482869645213696 + ], + "difference": [ + 4427218577690292387840, + -4427218577690292387840 + ] + }, + { + "m": 73, + "ranks": [ + 2, + 7 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + 590295810358705651712, + 4132070672510939561984 + ], + "difference": [ + 9149585060559937601536, + -3836922767331586736128 + ] + }, + { + "m": 73, + "ranks": [ + 3, + 6 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + -2361183241434822606848, + 1180591620717411303424 + ], + "difference": [ + 12101064112353465860096, + -885443715538058477568 + ] + }, + { + "m": 73, + "ranks": [ + 4, + 5 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + -3541774862152233910272, + -1180591620717411303424 + ], + "difference": [ + 13281655733070877163520, + 1475739525896764129280 + ] + }, + { + "m": 73, + "ranks": [ + 5, + 4 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + -3541774862152233910272, + -1180591620717411303424 + ], + "difference": [ + 13281655733070877163520, + 1475739525896764129280 + ] + }, + { + "m": 73, + "ranks": [ + 6, + 3 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + -2361183241434822606848, + 1180591620717411303424 + ], + "difference": [ + 12101064112353465860096, + -885443715538058477568 + ] + }, + { + "m": 73, + "ranks": [ + 7, + 2 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + 590295810358705651712, + 4132070672510939561984 + ], + "difference": [ + 9149585060559937601536, + -3836922767331586736128 + ] + }, + { + "m": 73, + "ranks": [ + 8, + 1 + ], + "whole_trace_gaussian_integer": [ + 9739880870918643253248, + 295147905179352825856 + ], + "split_trace_gaussian_integer": [ + 5312662293228350865408, + 4722366482869645213696 + ], + "difference": [ + 4427218577690292387840, + -4427218577690292387840 + ] + } + ], + "conclusion": "D_(P1+P2) on one family plus identity on a second family is not similar to D_P1 on the first and D_P2 on the second. The analogous exact complex residual also fails the trace invariant.", + "scope": "Refutes the stated elementary-permutation derivation for splitting one residual across two families. Does not rule out a different compiler with additional operations, changed storage or charged work." +} diff --git a/research/cross-family-residual-obstruction/LICENSE b/research/cross-family-residual-obstruction/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/cross-family-residual-obstruction/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/cross-family-residual-obstruction/README.md b/research/cross-family-residual-obstruction/README.md new file mode 100644 index 0000000000..dd2f752df6 --- /dev/null +++ b/research/cross-family-residual-obstruction/README.md @@ -0,0 +1,85 @@ +# A trace obstruction to splitting one residual across two families + +PR448 at [`9b966d8`](https://github.com/CrocSwap/integer-mult-bounds/blob/9b966d8188e1cadd00aa834078ee6a8742a9d9b4/research/cross-copy-hosting/PROOF.md) +proposes routing one residual onto pending coordinate sets in two different +families by an elementary coordinate permutation. Its proof uses the valid +same-family factorization `D_(P1+P2) = D_P1 D_P2`, then assigns the two factors +to different families. That assignment needs a new operator theorem: it is +not a consequence of the factorization or a coordinate conjugation. + +The obstruction is invariant under **every invertible linear change of +storage**, not only coordinate permutations. Consider one residual on family +A and identity on an otherwise unused family B. Replacing it with one factor +on A and the other on B gives different traces. + +## Bit permutation + +Let each family have addresses `(x,y)` in `F_q^m × F_q^m`. A rank-r coordinate +operator `D_r` exchanges r selected coordinates between x and y. It fixes +`q^(2m-r)` addresses, so this is the trace of its permutation matrix. If the +residual has positive ranks a and b, with a+b≤m, then + +``` +trace(D_(a+b) ⊕ I) = q^(2m-a-b) + q^(2m) +trace(D_a ⊕ D_b) = q^(2m-a) + q^(2m-b) +``` + +Their difference is + +``` +q^(2m-a-b) (q^a−1) (q^b−1) > 0. +``` + +Thus the two operators are not similar. Disjoint coordinate factors on the +**same** family do multiply correctly; putting them on separate families +changes the operator. Independent routing conjugations inside each family +do not change this trace conclusion. + +The smallest enumerated odd-field control uses q=3, m=2 and a=b=1. On the +162 physical scalar coordinates of two families, the whole residual plus +identity has trace90; the split action has trace54. The script explicitly +constructs both permutations, checks bijectivity and involutivity, verifies +the valid same-family product, and emits a differing input column. Additional +controls cover m=3 and the exact rank-eight formulas at the proposed m=64. + +## Complex factor + +For the inherited complex factor, the exact Fourier multiplier on r selected +binary coordinates is `i^(sum y_j)`. Therefore + +``` +trace(C_r) = 2^(m-r) (1+i)^r. +``` + +The difference between `trace(C_(a+b) ⊕ I)` and `trace(C_a ⊕ C_b)` is + +``` +2^(m-a-b) [2^a−(1+i)^a] [2^b−(1+i)^b], +``` + +which is nonzero for positive a,b because each bracket is nonzero. +For m=2, a=b=1 the traces are exactly `4+2i` and `4+4i`. The script enumerates +the exact Fourier exponents and sums them as Gaussian integers, with no +floating-point arithmetic. It also verifies the same-family factorization +and the exact rank-nine formulas at the proposed m=73. + +## Scope and reproduction + +```sh +python -B research/cross-family-residual-obstruction/verify.py +``` + +This refutes the stated coordinate-permutation derivation for a **single +residual split between two families**. It does not rule out a different +compiler that changes the local program, introduces and charges additional +operations or storage, or proves a global regrouping theorem. Those changes +are not supplied by the two inherited hosting facts alone. A scalar count or +slot-packing audit cannot establish the missing operator identity. + +The adjacent `r740-hosted-rank149` certificate retains whole-residual hosting +and does not use the cross-family extension. + +Prepared by chafreaky with OpenAI Codex assistance, Apache-2.0. The reviewed +proposal is by Sreekanth Nair / higherbeing with substantial Anthropic Claude +assistance; its exact commit and proof are linked above. This review does not +claim their endorsement. diff --git a/research/cross-family-residual-obstruction/verify.py b/research/cross-family-residual-obstruction/verify.py new file mode 100644 index 0000000000..830f459968 --- /dev/null +++ b/research/cross-family-residual-obstruction/verify.py @@ -0,0 +1,80 @@ +"""Exact obstruction to replacing one residual by factors on different families. +Read-only review of PR448 head9b966d8188e1cadd00aa834078ee6a8742a9d9b4. +Chafreaky with OpenAI Codex assistance. Standard library only. +""" +from itertools import product +from pathlib import Path +import hashlib,json + +def bit(q,m,a,b): + states=list(product(range(2),product(range(q),repeat=2*m))) + index={x:i for i,x in enumerate(states)} + def perm(first,second): + out=[] + for family,word in states: + w=list(word) + for i in (first if family==0 else second):w[i],w[m+i]=w[m+i],w[i] + out.append(index[family,tuple(w)]) + assert sorted(out)==list(range(len(states))) and all(out[out[i]]==i for i in range(len(out))) + return out + A=list(range(a));B=list(range(a,a+b)) + whole=perm(A+B,[]);left=perm(A,[]);right=perm(B,[]);split=perm(A,B) + compose=[left[right[i]] for i in range(len(left))] + assert compose==whole,'same-family factorization must hold' + count=lambda p:sum(i==j for i,j in enumerate(p)) + w,s=count(whole),count(split) + assert w==q**(2*m)+q**(2*m-a-b) + assert s==q**(2*m-a)+q**(2*m-b) + assert w-s==q**(2*m-a-b)*(q**a-1)*(q**b-1)>0 + bad=next(i for i in range(len(states)) if whole[i]!=split[i]) + return dict(q=q,m=m,ranks=[a,b],dimension=len(states),whole_trace=w,split_trace=s, + same_family_identity=True,not_similar_by_trace=True, + distinct_column=dict(input=states[bad],whole=states[whole[bad]],split=states[split[bad]]), + whole_sha256=hashlib.sha256(json.dumps(whole).encode()).hexdigest(),split_sha256=hashlib.sha256(json.dumps(split).encode()).hexdigest()) + +def complex_case(m,a,b): + # In the exact Fourier basis C_u has multiplier i^parity(u.y). + # Store eigenvalues by their exponents modulo four; sum as Gaussian integers. + whole=[];split=[] + for family in range(2): + for y in range(1<>a)&((1<s;actual.append(dict(m=m,q=q,ranks=[a,b],whole_trace=str(w),split_trace=str(s),difference=str(w-s))) +def mul(z,w):return (z[0]*w[0]-z[1]*w[1],z[0]*w[1]+z[1]*w[0]) +def power(n): + z=(1,0) + for _ in range(n):z=mul(z,(1,1)) + return z +def scale(n,z):return (n*z[0],n*z[1]) +actual_complex=[] +for a in range(1,9): + b=9-a;m=73 + z=scale(2**(m-9),power(9));whole=(z[0]+2**m,z[1]) + x=scale(2**(m-a),power(a));y=scale(2**(m-b),power(b));split=(x[0]+y[0],x[1]+y[1]) + pa,pb=power(a),power(b) + difference=scale(2**(m-9),mul((2**a-pa[0],-pa[1]),(2**b-pb[0],-pb[1]))) + assert difference==(whole[0]-split[0],whole[1]-split[1]) and difference!=(0,0) + actual_complex.append(dict(m=m,ranks=[a,b],whole_trace_gaussian_integer=whole,split_trace_gaussian_integer=split,difference=difference)) +out=dict(status='PASS_CROSS_FAMILY_ROUTE_OBSTRUCTION',reviewed_pr=448,reviewed_head='9b966d8188e1cadd00aa834078ee6a8742a9d9b4', + bit=rows,complex=complex_rows,actual_bit_rank8=actual,actual_complex_rank9=actual_complex, + conclusion='D_(P1+P2) on one family plus identity on a second family is not similar to D_P1 on the first and D_P2 on the second. The analogous exact complex residual also fails the trace invariant.', + scope='Refutes the stated elementary-permutation derivation for splitting one residual across two families. Does not rule out a different compiler with additional operations, changed storage or charged work.') +expected=json.loads(Path(__file__).with_name('EXPECTED.json').read_text()) +assert json.loads(json.dumps(out))==expected, 'exact counterexample differs from frozen output' +print(json.dumps(out,indent=2)) diff --git a/research/e8-bit-carrier-skeleton/EXPECTED.json b/research/e8-bit-carrier-skeleton/EXPECTED.json new file mode 100644 index 0000000000..973aaf30f1 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/EXPECTED.json @@ -0,0 +1,91 @@ +{ + "note": "Exact values that verify.sh must reproduce. The bit c is on the 10^-24 grid of PR #472's assembly (largest grid point admitted by both PR #315 moment engines with the inherited 10^-16 bad-branch allowance; the next grid point is rejected); kappa values are on the 10^-18 grid of the six-level, 47-inequality outer assembly.", + "word": { + "R": 489, + "content_sha256": "88435b75b8d6e5c722eb2aa1449f3a5e8e9601a9ffe243839ce1ec932ab76547", + "local_histogram": { + "1": 1200, + "2": 1440, + "4": 180, + "6": 120, + "8": 18 + }, + "source_destination_gates_A": 577, + "sources_rewritten": 117, + "five_stage_payload_bits": 100 + }, + "eleven": { + "bit_lower": "391360506745414227149/250000000000000000000000", + "bit_lower_decimal": "0.001565442026981656908596", + "profile": { + "1": 105600, + "2": 130560, + "4": 19680, + "6": 14400, + "7": 7680, + "8": 1584, + "48": 2, + "56": 2628 + }, + "bit": { + "live": 9600, + "physical": 9609, + "maxchild": 56, + "rank_mass": 745536, + "hosted_residuals": 43032, + "prefix_bits": 2119, + "charged_prefix_bits": 2176, + "coefficient_bits": 2119, + "three_level_coefficient_bits": 6411, + "charged_three_level_coefficient_bits": 6464, + "row_coefficient": 19431, + "halving_depth": 3 + }, + "emitted_program_sha256": "e37b52e4861c39154b5891460fb45df8651c92cd68961078f8f06596f057c822", + "kappa": { + "pr484": { + "kappa": "662515748707749/500000000000000000", + "kappa_decimal": "0.001325031497415498", + "binding_component": "complex", + "complex_lower": "663394767670133/500000000000000000", + "role": "primary" + }, + "pr471": { + "kappa": "260706019542937/200000000000000000", + "kappa_decimal": "0.001303530097714685", + "binding_component": "complex", + "complex_lower": "1305231506267591/1000000000000000000", + "role": "control (complex supplier of the current whole-residual frontier)" + }, + "pr458": { + "kappa": "323880830669511/250000000000000000", + "kappa_decimal": "0.001295523322678044", + "binding_component": "complex", + "complex_lower": "1297203880559577927527/1000000000000000000000000", + "role": "control" + }, + "pr448": { + "kappa": "358867191156973/250000000000000000", + "kappa_decimal": "0.001435468764627892", + "binding_component": "complex", + "complex_lower": "718766148669433/500000000000000000", + "role": "information only" + } + } + }, + "controls": { + "pr472": { + "bit_lower": "323442810173099014031/250000000000000000000000", + "kappa": "646049779721139/500000000000000000", + "published": "research/e8-r715-whole-hosted/EXPECTED.json at 259c684: bit_lower 323442810173099014031/250000000000000000000000, kappa 646049779721139/500000000000000000" + }, + "pr445": { + "bit_lower": "316240894019344628547/250000000000000000000000", + "published": "research/r740-hosted-eleven README at 40ab91d: 1264963576077378514188/10^24" + }, + "pr451": { + "bit_lower": "158442042752174644233/125000000000000000000000", + "published": "PR #451 body at f3a3815: c = 0.001267536342017397153864" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/LICENSE b/research/e8-bit-carrier-skeleton/LICENSE new file mode 100644 index 0000000000..261eeb9e9f --- /dev/null +++ b/research/e8-bit-carrier-skeleton/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/research/e8-bit-carrier-skeleton/MANIFEST.sha256 b/research/e8-bit-carrier-skeleton/MANIFEST.sha256 new file mode 100644 index 0000000000..1213654fbd --- /dev/null +++ b/research/e8-bit-carrier-skeleton/MANIFEST.sha256 @@ -0,0 +1,93 @@ +3494ba83280cc86548fe0cc6695c50d23e6b6ffca85aeb1a33337c1196e280cb EXPECTED.json +c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE +5f4b7fcbf99f572be28b6da612ce775363908cdfc7810f7aca167be01c86e49a NOTICE.md +e5212e8058c92a2b02cc12b4e174a65ce1cef7b4d7977ae770e64f5ff91b7204 README.md +03de1d341196cfa8cf1d39f3cc8648b25bb5f39c3c602a728cfbd089e8253ac0 SOURCE-pr370.json +16b1977240ca9acb58fa64572fb4231a423bc10bbf3e7bb30f1c8201fe369ba5 SOURCE-pr381.json +87c659ba932525631a40be14dca28a6a2efade8641f23bb08d6e1567fc991131 SOURCE-pr386.json +4a4f99f5bdb7530a0dcf9433f7f02afbf2abf908e718f7c63ffa5503d4f49693 SOURCE-pr436.json +e6f4a272442bb71ef68aaa3545b271236f9c99297e444fa01c62b0b5fb6a170f SOURCE-pr445.json +c771fa9be492408a78d6d970c839e68c4dfd1b66f4f4a4748e3d12726a43cf27 SOURCE-pr448.json +a639956eec858341987a815b7464ef472505300db754b5f9ac012dd01d18c8df SOURCE-pr451.json +cbdea984a46ab5de354b95e73fd76c1918fdc6676c658398a552772c4dc3dcaf SOURCE-pr458.json +499d861e090c9e646d978dd67890a8e58a9ff6bf08512684e66605179132076b SOURCE-pr471.json +6753bcf50c91806b75dd4dbe3963a79699a614d0dab8ce32b261cc3e76b288b1 SOURCE-pr472.json +2515c4f23dfa22a21913d92597669770f7f44c2a5b3ef069ef68a0c89779a656 SOURCE-pr473.json +9c7c4ea678865a955b0c89f0952927159976fdf55cadc6a488dec5757f03fe7d SOURCE-pr478.json +24e3eab4a985e115adb7f8665a401423e9636e9f16cc4373ec68cc86950445a8 SOURCE-pr483.json +b92f43fbcba3921a1aa37bcb9f05cf5fa612ff708785e05512438a6317bf0867 SOURCE-pr484.json +d1297f9052be4f2496e1ff2a77e4db2c0cdbd7d460d489b4c03e50bf317238ce code/bit/checkers/columns_h.cpp +1c344d18fcd494eeca93e259f10cafae7705780e6592f6dcb35b34752dab9bc2 code/bit/checkers/columns_k.cpp +223a5a07731fc315a90a3e48177796babc155c1d9985c7ae5017eff6af2a0608 code/bit/checkers/gram_frames.py +aaf127c04cb31c406e5b04a63f1ae89369fccde6d8fa7cdda1ed4f32dfc5de63 code/bit/checkers/json.hpp +6c1ef2b24e57781d6951c172a1024fc4300e6fd392c9d6672079a7806ab663b3 code/bit/checkers/legality_h.cpp +8a5999601f917dbb492bb9ae9a344611f18cc7cedc53dc3c76496a369e530eb3 code/bit/export_records.py +11bf9620ca9db16d52d9fe806b814fc9ec9a89c4d7645354d1861d96f6e805ad code/bit/independent/checkword.py +2c63a039f97e3a11ce5a6b83302d4f5beda160c1db14164a5a9b0855aeb19d3c code/bit/independent/interface.py +0ff65aace5da4b57d96235bf830f8f11969322e75134d498aeb70e9753ec6b0d code/bit/independent/mutate.py +3b002c19a5dcca76a5594f2a30fac7c01d2b45fc96b3e7cfbfd8b720f5ffb4e8 code/bit/independent/mutate_mut.py +d6e9f58de3fa41f538516b6227c249d61fb30f0f6843027cc8a07a1a372fa6b6 code/bit/independent/relax.py +b0e75d6550412a7be4017695e6b237392b611bb852ad8ff309d6682c9f166a4e code/bit/mutate_records.py +a9e085ec60d5657cd5d77832e3d95004e81b9f4f249d9e0fc95e345366cb2d2e code/bit/mutate_records_mut.py +6c288f6f234b528c1a7c0a4adfb724e91e0fe6b18c8dffad96af3f973de1829a code/bit/regression/stage_cohort.py +a4c2dd4755f2a45ceda327b36d9ee400c2804893000626ca8ff3f6ee296fd842 code/cited.py +d8a8c13b484d985f0133a5d06de4a78b8477314f922b9f693ba73640b7184d6b code/eleven/adapt.py +c47889a606701ae592374dd82a13cee8c5a4e8449b7facfdad2d90563a30a18c code/eleven/assemble.py +5ad832830c19ec6c904d1b64480f6b1e71c5673fdd38d487d17e179b1d197c09 code/eleven/audit.py +b0b25955875625ed63f82690f83aef976e3e9a978ae6620b23a23fc1207acd46 code/eleven/emit.py +95275473d7f9811011bda760dd0f04de5169c2a6922456dc9a5725a5d671f941 code/eleven/local_audit.py +abb60c35e448e0f94073f38a0352d11249aaf7bb8dbd7352414ae60a1d2b79c3 code/hub/e8-r715-whole-hosted/code/assemble.py +d28062127a9b0d3866a3b79aad98a307233b20ebdb94cfb9f197d726b82ffea5 code/hub/e8-r715-whole-hosted/code/audit.py +98d77cefbc3a76f9f10bd7df3a2590ab88b411f6afe77b5f8d73f1602eb2bef3 code/hub/e8-r715-whole-hosted/code/emit.py +23eda3fe3d774e7f2dbf4dbdd4ff90d69ae7d1762ff95c8629cdc7667aa3fe71 code/hub/e8-r715-whole-hosted/code/local_audit.py +765382d4fefd594e94c8c5826ec6300422ce9f79c816d7f7323ef85e99320f28 code/hub/e8-r715-whole-hosted/data/hosting.json +750221cc66badd0ed0a74e7aad2d59f91f89c107370af21c6d929fbdd4a08a9f code/hub/e8-r715-whole-hosted/data/residual-isometries.json +b2af02f593cd161bea64e6cd793508386914136be519f80726c071697379d5a9 code/hub/e8-r715-whole-hosted/data/word.json.gz +7c6997c455bd55acca3a1603797c34e7733d557c27a7694a1429ff15773a505d code/hub/e8-r740-replica32/code/bank_routes.py +1cb286196c1530d06f50f0997febc5993b388f33464e295611b920ba30a24eeb code/hub/e8-r740-replica32/code/e8core.py +aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098 code/hub/e8-r740-replica32/code/engines/base_two_moment.py +81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482 code/hub/e8-r740-replica32/code/engines/moment.py +c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c code/hub/e8-r740-replica32/code/engines/outer.py +d6ae4a556472d403773cd2117c992bfc10e1187112da1b3893f3fae628a131dd code/hub/e8-r740-replica32/code/tile_m.py +e12ed7ddd13cee101ba74a083b54665fd64d0b122b0bad5b83d817dcc8bae9d8 code/hub/e8-r740-replica32/data/residual-isometries.json +d8d6d3d3f336720302bc40b3c1504fe3c3583a7a8d707bb9bd7b21f85e5e69c6 code/hub/e8-r740-replica32/data/word.json.gz +d8b90cd5d152df3c7c351230863d9e61816ad5e1f21d69bea1a86a5daad559a3 code/hub/idle-axis-hosting/hosting_core.py +ac63ee481f3d75cb9f0658faaa2412db81d55bc44d9f1ff1c0329ce1e75aa0d4 code/hub/r740-hosted-eleven/code/emit.py +9554182d67e434ea84b4430f909a2c400abc755d8487b51454a8e6968e62859d code/hub/r740-hosted-eleven/code/geometry.py +de4a9b9cd797e1a05da56f62cfe725c8728cea3a4aa031b7d1b0a68f869760d6 code/hub/r740-hosted-eleven/code/row_bound.py +52dbbb68e8c147690d15eaa1d952df05d074b0c121885a4159d9f6732f391872 code/hub/r740-hosted-eleven/data/selection.json +ac63ee481f3d75cb9f0658faaa2412db81d55bc44d9f1ff1c0329ce1e75aa0d4 code/hub/r740-hosted-rank149/code/emit.py +b23fda74a7979179e8fd83ee9870c1e232442cc90c05077adaabfe31d050d1e4 code/hub/r740-hosted-rank149/data/residual-isometries.json +4d9c2cf6a3d31a6faa287731e0721cb16601b0bc5c1a186b9645bfb5760ce8db code/hub/r740-hosted-rank149/data/selection.json +41626789888ee070e1b435fa380b10ab9b88e3cf7d8d8e166ecef17269bbcf47 code/hub/r740-hosted-rank149/data/word.json.gz +36eeda3184bd009e89462b65c8725d10860c444f8da8f1f87e5f6e50120011ca code/nine/geometry.py +aee70c242a2f1d225528fabe2002e1564d1dc884797c07d28a831c7878ee9098 code/pricing/base_two_moment.py +81cbc864e106418fc7854322746f72180cb8110ff39f74450a3b8d55a82c1482 code/pricing/moment.py +c1ebb52163a7219504c728a5c2b098bf1e50bf20148a2879c5a74c3cadc7c03c code/pricing/outer.py +98cd03bc9582e7bd0ab194c191ea8eea940539e510051443ab9fd3e572a364ab code/pricing/prime_witnesses.py +e28fd87d0e34a6f6f6f1fddb6c4891deac220662c954de855d7aa5a7f9cceca4 code/provenance.py +721d859a6517d665ca84d03ef89668da3aae7433ffb0ee47faf37f2aeb85450e code/skeleton/e8.py +7cdcf48078ed4beacd2e240aa8145e4aa6984558748d07659cb1b252786e073a code/skeleton/gen.py +bb356568fa05e7bfd5fcd9012903611cf742729a99b4dc3a13685355b2678ae3 code/skeleton/geom.py +2b6c12d96f24a4e81f2c807827c2b74cf80037367fc8034e8c871dd5ce008351 code/skeleton/wordkit.py +1fb726ea3818fe0837cceb0dd22a71a0814f064e5e781628104610d6468e0e55 data/bit/bitE8-r865.json.gz +835eb96e147740fc7454f8cfb3dbd34ae89524b1dbd89a61e9288eae8ab6a5b9 data/bit/bitE8mut-r489.json.gz +dce3f4b76aa3f6c3ba826ce556ffa61398b33e81e4d1a226dd2a36ce684fb02e data/complex-b.json +18b42250c3faf6f0df76fcab6c3a483582192ad7bb09cb1985f4b0bb91d67024 data/complex/pr448/EXPECTED.json +a4312cb0c53c2066a28b683a971a41e7d76c5f6d828a96481c3ae7b3c01bb2f3 data/complex/pr458/EXPECTED.json +188f9d1a7450496dbfd8d64381febd20b0597141537eb1a003435297df2d1720 data/complex/pr471/EXPECTED.json +70e515f0a5a2f9508cd030d35a99f90981a6eccc027c9ad5a3c77f5860310910 data/complex/pr473/EXPECTED.json +07bd05d14c71df8925b0b03510b2b337334b73ac425a94e03b2ec34ed2680164 data/complex/pr478/EXPECTED.json +799fa4ab2f785c478c3cdcb6c1c0428a5ce6e3ddbe4a4b2fd88630d811a593f6 data/complex/pr483/EXPECTED.json +0c93018a23bc573c7d155d4786e0c3978e95be0fda974076697939a1a1d8e5be data/complex/pr484/EXPECTED.json +61f790657c465d16d3455f48f90f816797b9ea08bf02dbd0c90d2cf41836257e data/eleven/hosting.json +0fa5b353a0321af2ce4e2045db1d4c2d6418a11663894e2afcdb1eaa1984bddc data/eleven/residual-isometries.json +d69ffe3326140bc541b8f1639e02db43a5835ab8ca02cc742b5bee2bf2ef1ba9 data/skeleton/d4part-pairs.json +f6162bb4d8092bc233700fa7ebc6a0d79f2893135aee18e998369044abb3f44b data/skeleton/plan-skB.json +b09aa45d5651720e10326cde559c863ba3ea45fe2fb6b4aaa3bfaa66a8fcf69f discovery/README.md +a64927c340a4772ce0682b349e0c90c80d1a766000ccf397fb41b36a31929179 discovery/d4part.py +2aaaac18e083d289d4341e734c32571c89c51fefba04b388d407c7372b906dc7 discovery/host_select.py +40e8dea1b4b71c5afd5993625f57bcac089dd2f72dfbc4dbc23ce917e5a61010 discovery/plan.py +420094be2af295eed03a983dd66debbbe9cfb78d8252859f4498a615a0074b99 portable-include/bits/stdc++.h +6023d480f929cdfa4e2f35e361eea003451cd6695af806935a32038b0115abb5 requirements.txt +0f9248aa3611dfe2b5d59dbe992c6f7d21a0cc4f1de2b5ed05a6110191191224 verify.sh diff --git a/research/e8-bit-carrier-skeleton/NOTICE.md b/research/e8-bit-carrier-skeleton/NOTICE.md new file mode 100644 index 0000000000..5a0ecdcd2c --- /dev/null +++ b/research/e8-bit-carrier-skeleton/NOTICE.md @@ -0,0 +1,69 @@ +# Notice + +Apache-2.0 (`LICENSE`). Prepared by eumemic with substantial Anthropic Claude assistance. + +## New in this package + +- `code/skeleton/`: the D4 quad-skeleton geometry (`geom.py`), the word builder with source registers as gate + destinations (`wordkit.py`), the generator (`gen.py`) and an E8 root-line helper (`e8.py`, #370's Hamming + coordinates and line order). +- `data/skeleton/plan-skB.json` (CP-SAT plan nominated by `discovery/plan.py`), `data/skeleton/d4part-pairs.json` + (the 5-pair D4 partition, found by `discovery/d4part.py`), `data/bit/bitE8mut-r489.json.gz` (the word), + `data/eleven/hosting.json` (frozen hosting selection nominated by `discovery/host_select.py` with #442's integer + programme), `data/eleven/residual-isometries.json` (the frame-zero record of #443's isometry format: every helper of + this word enters at frame zero). +- `code/bit/independent/relax.py` (generates the relaxed #370 checker), `interface.py` (#425 lemma hypotheses), + `mutate_mut.py` (word-level mutants and hypothesis controls), `code/bit/mutate_records_mut.py` (record-level + mutable-source mutants). +- `code/eleven/adapt.py` and the adapted files it checks, `code/eleven/{emit,audit,local_audit}.py` (PR #472's files + plus 19 listed edits: R = 489, package paths, a `--hosting` argument, one frame-zero entrance instead of eleven). +- `code/eleven/assemble.py`: PR #472's bit invoice and pricing arithmetic with R as a parameter, and its outer + assembly run once per cited complex supplier. +- `code/cited.py`, `data/complex-b.json`, `verify.sh`, `EXPECTED.json`, `requirements.txt`, `discovery/`, + `.github/workflows/e8-bit-carrier-skeleton.yml`. + +## Vendored, byte-identical (git blob ids in `SOURCE-pr*.json`, checked by `code/provenance.py`) + +- **PR #370 (Dylan Crow / utcorvusvolat-dotcom, with Anthropic Claude assistance), commit b7fe9cd:** the independent + checker `checkword.py` and its controls `mutate.py`; `export_records.py`, `mutate_records.py`, `stage_cohort.py`; + PR #266's official cohort checkers as generalised there (`legality_h.cpp`, `columns_h.cpp`, NCOPY); nlohmann/json + (`json.hpp`, MIT licence in its header); `gram_frames.py`; PR #315's engines (`code/pricing/`, DreamingOfClouds); + the R865 word `data/bit/bitE8-r865.json.gz` (read only for the E8 label table by the geometry scripts); `LICENSE`. +- **PR #381 (DaysSky, assisted with Claude), commit 00765b2:** `columns_k.cpp`. +- **PR #386 (Zhihao Chen / jacklightChen, with OpenAI Codex assistance), commit dd11cf8:** the nine-stage bit geometry + `code/nine/geometry.py` (parent geometry checked by the eleven-stage audit) and `portable-include/bits/stdc++.h`. +- **PR #436 (eumemic, with Anthropic Claude assistance), commit 8f6b829:** `code/provenance.py`. +- **PR #445 (chafreaky, with OpenAI Codex assistance), commit 40ab91d:** `code/hub/r740-hosted-eleven/code/geometry.py` + (eleven-stage geometry), `row_bound.py` (orthogonal-cover row bound), `emit.py` and `data/selection.json` (used + unchanged for the PR #445 control). +- **PR #451 (chafreaky, with OpenAI Codex assistance), commit f3a3815:** `code/hub/r740-hosted-rank149/`: its + eleven-stage bit emitter (byte-identical to PR #445's), frozen selection, R740 rank149 word and isometries + (PR #451 control). +- **PR #472 (chafreaky, with OpenAI Codex assistance), commit 259c684,** and files its branch carries unchanged: + - `code/hub/e8-r715-whole-hosted/`: PR #472's eight-replica pooled emitter, independent audit, local projector + audit and assembly (the originals of the adapted files), its R715 word, isometries and frozen hosting (used + unchanged for the PR #472 control); + - `code/hub/e8-r740-replica32/`: PR #443 (chafreaky): `bank_routes.py`, `tile_m.py`, `e8core.py`, the R740 rank138 + word and its isometries (PR #445 control); PR #315's engines (DreamingOfClouds) in `code/engines/`; + - `code/hub/idle-axis-hosting/hosting_core.py`: PR #442 (DaysSky, with Anthropic Claude assistance). +- **Receipts (`data/complex/`):** `EXPECTED.json` of PR #484 (DreamingOfClouds, 035845c), PR #471 (Dugongue, + 56b3da6), PR #458 (chafreaky, 44e9eae), PR #448 (higherbeing, 359022b), and of the bit-bound frontier PRs #483 + (Dugongue, 3738c3c), #473 (rohanarun, c7590f1) and #478 (Dugongue, bea1d52). + +The repository-level files `certificates/joint-dual-kappa.json`, `certificates/joint-dual-validation.json` and +`research/joint-dual/SOURCE.json` in this branch are byte-identical to rohanarun's PR #318 (a45747d). They repair +stale root-file pins so the repository's joint check passes; #417, #436 and #439 carry the same repair. + +## Cited, not rebuilt + +Complex coarse savings in `data/complex-b.json`, each bound to its PR's `EXPECTED.json` by `code/cited.py`: +PR #484 (primary; draft, conditional on its Lemmas A and G), PR #471 (the complex supplier of #473, #478 and #483), +PR #458 (the complex supplier of #472) and PR #448 (information only; disputed cross-copy split). No complex +construction is rebuilt here. + +## Ideas used + +PR #425 (Zhihao Chen, with OpenAI Codex assistance): the scalar-interface lemma that permits source registers as +gate destinations when the full-frame cleanup restores them. PR #463 (DreamingOfClouds, with Claude Opus 5.5): the +carrier bound (three registers leave a source's line). PR #433 (icekylinx): source rows written on the bit side. +PR #442 (DaysSky): idle-axis hosting of whole residuals. Jacob Sussman introduced the E8 unit. diff --git a/research/e8-bit-carrier-skeleton/README.md b/research/e8-bit-carrier-skeleton/README.md new file mode 100644 index 0000000000..dd0d7c4361 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/README.md @@ -0,0 +1,164 @@ +# E8 bit word with source carriers: R = 489 on a D4 quad skeleton + +A new E8 bit supplier (h = 8, v = 120, 9 retained totals) with **489 helpers**; the hub's best bit word had 715 (#463). +Its source registers also carry partial sums, which is PR #425's mutable-basis interface applied on the bit side +(the review point below). Priced by the hub's eleven-stage whole-residual hosted bit pipeline (#445 geometry, +#472 emitter, audit and finite invoice, #442 hosting, #315 engines): + +| quantity | value | +|---|---| +| bit c, eleven stages, eight pooled replicas, every residual whole and hosted (10^-24 grid) | `391360506745414227149/250000000000000000000000` = 0.001565442026981656908596 | +| same pipeline on #472's R715 word (control, reproduced exactly) | 0.001293771240692396056124 | +| five-stage saving from #370's checker (no envelope) | 0.00127887365561970469 | + +The bit side no longer binds: c is 20.6% above the best whole-residual bit supplier (#483, 0.0012982901) and 18.0% +above the largest whole-residual complex b. Through the six-level, 47-inequality outer assembly (#434/#315, as in +#472), every composition is complex-bound: + +| complex supplier (cited from its receipt, not rebuilt) | complex b | κ | +|---|---|---| +| **#484** (DreamingOfClouds; draft, conditional on its Lemmas A and G) | `663394767670133/5·10^17` = 0.001326789535 | **`662515748707749/500000000000000000` = 0.001325031497415498** | +| #471 (Dugongue), the complex supplier of #473, #478 and #483 | `1305231506267591/10^18` | `260706019542937/200000000000000000` = 0.001303530097714685 | +| #458 (chafreaky), the complex supplier of #472 | `1297203880559577927527/10^24` | `323880830669511/250000000000000000` = 0.001295523322678044 | + +The best whole-residual κ on the hub when this was prepared is #483's 0.001296606691405309, bit-bound with +#471's complex b. With #484's supplier this word gives +2.19% over it; with #471's supplier, +0.53%. Each κ above +is the complex cap of its supplier: any bit word with c above b gives the same value. The #484 value inherits that +draft's two lemmas as review points. + +Information only, not a claim: #448's cross-copy complex supplier (b = `718766148669433/5·10^17` = 0.001437532) +would give κ = `358867191156973/250000000000000000` = 0.001435468764627892, complex-bound. That number rests on +#448's cross-family residual split, which #451 disputes (research/cross-family-residual-obstruction; the author's +rebuttal is on #451's thread). + +## The word + +`data/bit/bitE8mut-r489.json.gz` is rebuilt byte-for-byte by `code/skeleton/gen.py` from the frozen plan +`data/skeleton/plan-skB.json` and the D4 partition `data/skeleton/d4part-pairs.json`. Format: bitE8/1 (#370), with +gates allowed to write source registers. + +- **Partition.** The 120 root lines split into 10 D4 sub-root systems (12 lines each), in 5 orthogonally + complementary pairs. Each block has 3 orthogonal 4-frames: 30 four-frames and 180 cells (a cell is a pair of lines + in one 4-frame; it spans 2 dimensions and contains exactly those 2 lines). +- **Sources.** A fixed matching splits each 4-frame into two matching cells and four cross cells. A source stays in + its matching cell and two carriers copy it at its line into its two cross cells: three branches per source. Three + is the minimum: s⊥ (an E7) is a spherical 4-design, so two hyperplane sections do not cover it (the carrier bound of + #463). +- **Cells and quads.** Each cell delivers its sum to its two quads and keeps single lines: a cross cell uses its + two branches and one empty register, a matching cell its two sources and two empty registers. A quad is a + 4-dimensional D4 frame made of 6 cells from 6 blocks (3 complementary block pairs); there are 60. A butterfly on + the 6 delivered cell sums gives 6 outputs S + u_H, one per D6 the quad feeds (S is the quad's sum; u_H is the + owner D6's d-cell, its Q-cell or both). +- **Tops.** Target t is reached through the three D6 frames {t, e}⊥ (e the other lines of its 4-frame). At the D6 + shared with its matching partner it reads two quad outputs and a Q-delivery; at t⊥ it reads one register from each + of its two other D6 frames. +- **Q-nodes (the source writes).** For each block, its 12 sources (all sitting in matching cells) undergo one + invertible F2 transform at the block's D4 frame. It produces the 6 Q-deliveries read by the complementary block's + targets and 6 leftovers. These are the only gates that write sources: 577 gates, all at block D4 frames, each + reading one other source; 117 of the 120 source registers are written. +- **Totals and cleanup.** The 9 decoder totals of #370 are collected at the full frame on 9 fresh registers from + registers that are no longer needed. The cleanup C is the literal reverse of every source and helper gate of A and + B at the full frame, so every source and helper is restored; D is #370's frame-zero dirt compensation. +- **Count.** 120 sources, 240 carriers, 240 cell registers, 9 totals: R = 489. Local paid histogram + {1:1200, 2:1440, 4:180, 6:120, 8:18}, rank mass 5664 = 8R + 72 + 240·7. + +## Review point: source registers as gate destinations + +PR #370's independent checker contains one assertion this word does not meet: "x registers are never destinations". +PR #425's scalar-interface lemma (Zhihao Chen) shows the assertion is a sufficient condition, not a necessary one: +if no target feeds a source or helper register, the raw word is z' = U z, y' = V y + J x + K s; a frame-zero +preconditioner (here D) and U⁻¹ at the common full frame after the last climb (here C) give exactly +(x, s, y) → (x, s, y + x). #425 uses this with sources carrying packets below the full frame on the complex side; +#433 (icekylinx) already wrote source rows on the bit side, at the full frame only (559 XORs in its R758 word). +This word writes sources below the full frame (block D4 frames), as #425's packets do. + +What the package checks about it: + +- `code/bit/independent/relax.py` generates the relaxed checker from #370's pinned file by removing exactly that + assertion (it counts such gates instead). Every other check is unchanged, including the exact F2 replay on all + 729 columns, which requires every source to end holding exactly its own column. The stock file is run as well and + must refuse the word with "x register written". +- `interface.py` checks the lemma's hypotheses directly: no target feeds a source or helper; D writes only targets + from helpers at frame zero; C acts only at the full frame and is the literal reverse of the source and helper gates + of A and B; B writes only targets. +- Mutants aimed at the interface are rejected: dropping a source cleanup gate, corrupting a packet that targets + read while keeping every source restored, leaving a source unrestored, moving a source write below the source's + frame, dropping a source write (relaxed checker); the same three record-level mutants against both official + column checkers; two F2-neutral edits in which a target feeds a source or a helper (accepted by the F2 checker, + rejected by `interface.py`). +- The official cohort checkers (`legality_h`, `columns_h`, `columns_k`) treat every register alike and accept the + word unchanged. In the hub's bit address realization (#472's PROOF.md, "Shared physical labels") the pullback of + D_F on F2-valued streams does not depend on whether a register is called a source, helper or target, so the + common-frame argument covers source registers as it covers helpers. The mutable-basis realization stays a listed + conditional interface, as in #472, #473 and #478. + +## Checks (`verify.sh`) + +0. Manifest; 50 vendored files byte-identical to their PRs (git blob ids, `SOURCE-pr*.json`); the adapted hub + files equal #472's files plus the listed edits (`code/eleven/adapt.py --check`); cited complex b values equal + their PRs' own receipts (`code/cited.py`). +1. The word rebuilt from the frozen plan equals the shipped word. +2. #370's checker: the stock file refuses; the relaxed copy passes (legality, exact F2 on 729 columns, 671 frames + with positive Gram determinants, primes {2}, five-stage price); `interface.py`; 11 word-level mutants and 2 + hypothesis controls. +3. Official checkers: legality (NCOPY = 9; 33,990 ADDs, rank mass 5,664), five-stage formal columns (969 columns, + prefix payload 100 bits < 104), eleven-stage formal columns (#381's `columns_k`, KPAIRS = 5: 1,689 columns, + 2,880 bridge additions, 24/24 omitted-bridge controls), the KPAIRS = 2 regression, #370's 6 record-level + mutants and 3 mutable-source record mutants. +4. Exact Gram determinants and prime witnesses on all 672 frames. +5. Eleven-stage whole-residual hosting: #386 nine-stage geometry (parent of the audit), #445 eleven-stage geometry, + #472's emitter and independent audit with R = 489 (all 43,032 helper residuals hosted whole on idle data + families of the eight pooled replicas, 6,579 unbanked scalar columns restored, 24 omitted bridge shears + rejected, 22 template mutations rejected, 3,252,216 renamed instructions), then #472's bit invoice and both + moment engines, and the outer assembly per cited supplier (#484, #471, #458; #448 for information). +6. Controls through the unmodified hub files: #472's R715 word reproduces c = 0.001293771240692396056124 and, + with #458's b, κ = 0.001292099559442278 (#472's published values); #445's R740 word through #445's emitter + reproduces c = 0.001264963576077378514188, and #451's R740 rank149 word through #451's emitter (byte-identical to + #445's) reproduces c = 0.001267536342017397153864. +7. Every number above against `EXPECTED.json`. + +```sh +python -m pip install -r research/e8-bit-carrier-skeleton/requirements.txt +bash research/e8-bit-carrier-skeleton/verify.sh /absolute/new/output +``` + +Python 3.11+, numpy, sympy, a C++17 compiler (`CXX`) and Boost headers (`BOOST_INCLUDE`). About 2 minutes. + +## Finite invoice + +The physical prefix (#472's chronological cancellation-free bound over physical families) is 2,119 bits, charged +at 2,176; the three-level coefficient is 6,411 bits, charged at 6,464. Both are larger than #472's (804/2,496) +because the Q-node butterflies and the totals have long XOR chains; they stay below the hub's precedent (#473 +charges 3,456 and 10,304) and only enter the finite cutoffs. Maximum child 56, three-level halving, row +coefficient 19,431 < 20,161 (#445's orthogonal-cover bound). + +## Bounds for this family (analysis, not run by verify.sh) + +R ≥ 120 for any design (top arrivals; carriers). For tops through consistent D6 triples, at least 14 registers per +4-frame at dimension 6, so R ≥ 300. With three branches per source on this partition, at least 3 registers per cell +(540 at dimension 2), so R ≥ 420. With the totals in phase A, a brute force over all d-parity patterns needs 4 +single-line registers per 4-frame for the targets' parities, and each block's Q-node needs all 4 lines of each of +its 4-frames; no register can do both, and 3-register cells leave only 6 single-line registers per 4-frame. That +gives 20 registers per 4-frame, 600 in all, so R ≥ 480. R = 480 is reached with the totals on leftover registers, +but its prefix payload is 129 bits > 104; nine fresh total registers give R = 489 at 100 bits. + +## Scope + +Conditional on every interface #472's eleven-stage composition retains: the all-size bit/Gaussian compiler, +mutable-basis and target-label realization, whole-call correlated-helper hosting (#442), compressed windows, +restored work, common grid and tape, precision, row and analytic contracts. Complex savings are cited from their +PRs' receipts, not rebuilt; the primary κ also rests on #484's Lemmas A and G. The hosting selection is a frozen nomination of #442's integer programme +(`discovery/host_select.py`) and the plan a CP-SAT nomination (`discovery/plan.py`); neither is claimed optimal. +No unconditional multiplication theorem, Lean proof or κ = 1 result is claimed. + +## Credits + +Zhihao Chen (#425: the mutable-basis interface lemma; #386: nine-stage geometry); DreamingOfClouds (#463: the +carrier bound; #315: moment engines; #484: the primary complex supplier); DaysSky (#442: idle-axis hosting; #381: `columns_k`); chafreaky (#445, #451, +#472: eleven-stage geometry, row bound, pooled whole hosting, emitter, audit and invoice; #443's bank routes; +#458's complex supplier); Dylan Crow (#370: bitE8/1 format, independent checker, generalised official checkers); +icekylinx (#433: source rows written on the bit side); Dugongue (#471: complex supplier; #483: current +whole-residual frontier); higherbeing (#448, information only); eumemic (#436: R740 and the provenance tooling); Jacob Sussman (the E8 unit). Details in +`NOTICE.md`. + +Prepared by eumemic with substantial Anthropic Claude assistance. Apache-2.0 (`LICENSE`). diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr370.json b/research/e8-bit-carrier-skeleton/SOURCE-pr370.json new file mode 100644 index 0000000000..1b30f277af --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr370.json @@ -0,0 +1,69 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/370", + "head_repository": "utcorvusvolat-dotcom/e8-bit-kappa-8.7548e-4", + "commit": "b7fe9cdf2da009c947ff6b334c562bc190b30373", + "note": "PR #370 (Dylan Crow / utcorvusvolat-dotcom, with Anthropic Claude assistance): independent checker and its word-level controls, record exporter and record-level controls, PR #266's official cohort checkers as generalised there (NCOPY), Gram/prime-witness checker, PR #315's engines (DreamingOfClouds) as vendored there, the E8 label table (via its R865 word), LICENSE. Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "LICENSE": { + "source_path": "research/e8-bit/LICENSE", + "blob": "261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64" + }, + "code/bit/independent/checkword.py": { + "source_path": "research/e8-bit/code/bit/independent/checkword.py", + "blob": "da4e0fe05067184d4dab1e130ae1384c1fa983f5" + }, + "code/bit/independent/mutate.py": { + "source_path": "research/e8-bit/code/bit/independent/mutate.py", + "blob": "eba592fd468e0d7e7e5100fe99da6eb548c5906b" + }, + "code/bit/export_records.py": { + "source_path": "research/e8-bit/code/bit/export_records.py", + "blob": "3632d370486a02f5456f7643ced03f8c925b2350" + }, + "code/bit/mutate_records.py": { + "source_path": "research/e8-bit/code/bit/mutate_records.py", + "blob": "6794516f665d36eac189894e350a5ad01113cb4c" + }, + "code/bit/regression/stage_cohort.py": { + "source_path": "research/e8-bit/code/bit/regression/stage_cohort.py", + "blob": "f6d7afe3e623208c4207b6a683a1e3e49249e31c" + }, + "code/bit/checkers/legality_h.cpp": { + "source_path": "research/e8-bit/code/bit/checkers/legality_h.cpp", + "blob": "cb1233c7e96b1aa8bbf4d2e4165d75ab0dca64b9" + }, + "code/bit/checkers/columns_h.cpp": { + "source_path": "research/e8-bit/code/bit/checkers/columns_h.cpp", + "blob": "00c5a3a5d81d083582f60f33dd2e7bea5049c37f" + }, + "code/bit/checkers/json.hpp": { + "source_path": "research/e8-bit/code/bit/checkers/json.hpp", + "blob": "82d69f7c5d044c9887c96b90c97f5639083ecd14" + }, + "code/bit/checkers/gram_frames.py": { + "source_path": "research/e8-bit/code/bit/checkers/gram_frames.py", + "blob": "b740d47295c02692260d7cc01874a49fe48f78ab" + }, + "code/pricing/moment.py": { + "source_path": "research/e8-bit/code/pricing/moment.py", + "blob": "7d697cb45203fe72d97037403d6da41f71f3b7fd" + }, + "code/pricing/base_two_moment.py": { + "source_path": "research/e8-bit/code/pricing/base_two_moment.py", + "blob": "14a90fa0e788217856f070382c9e61bd7c603c61" + }, + "code/pricing/outer.py": { + "source_path": "research/e8-bit/code/pricing/outer.py", + "blob": "43007488ad2c43187c77cc6798beff8b1cd76ad2" + }, + "code/pricing/prime_witnesses.py": { + "source_path": "research/e8-bit/code/pricing/prime_witnesses.py", + "blob": "7f16d930302ae879c562dd58e085d9747fcac077" + }, + "data/bit/bitE8-r865.json.gz": { + "source_path": "research/e8-bit/data/bit/bitE8-r865.json.gz", + "blob": "8bec1751f7e33c3a1e4673ef5dbc34d6f205321e" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr381.json b/research/e8-bit-carrier-skeleton/SOURCE-pr381.json new file mode 100644 index 0000000000..fb0b0edd13 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr381.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/381", + "head_repository": "DaysSky/integer-mult-bounds", + "commit": "00765b291d0f924f337298eb1e2930cb0878b95e", + "note": "PR #381 (DaysSky, assisted with Claude): the B_K formal-columns checker columns_k.cpp (KPAIRS). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "code/bit/checkers/columns_k.cpp": { + "source_path": "research/e8-nine-stage-kappa/code/bit/checkers/columns_k.cpp", + "blob": "42bb232fbec4de703e70cc13dc2f39a3b43a3a01" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr386.json b/research/e8-bit-carrier-skeleton/SOURCE-pr386.json new file mode 100644 index 0000000000..3744861904 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr386.json @@ -0,0 +1,17 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/386", + "head_repository": "jacklightChen/integer-mult-bounds", + "commit": "dd11cf8069554f0333afde398f12a56c3a7c29dd", + "note": "PR #386 (Zhihao Chen / jacklightChen, with OpenAI Codex assistance): compressed nine-stage bit geometry (used here only as the parent geometry of the eleven-stage audit) and the portable bits/stdc++.h. Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "portable-include/bits/stdc++.h": { + "source_path": "research/e8-bit-complex-nine/portable-include/bits/stdc++.h", + "blob": "fc5664e929d9a81d9b4926bee049a93330be86ec" + }, + "code/nine/geometry.py": { + "source_path": "research/e8-bit-complex-nine/geometry.py", + "blob": "91594e0223e8fac49162b5aef834ffaa8e94a254" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr436.json b/research/e8-bit-carrier-skeleton/SOURCE-pr436.json new file mode 100644 index 0000000000..f190527ae1 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr436.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/436", + "head_repository": "eumemic/integer-mult-bounds", + "commit": "8f6b8297b08ad863940d5168a2db5402fad3690f", + "note": "PR #436 (eumemic, with Anthropic Claude assistance): the provenance checker. Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "code/provenance.py": { + "source_path": "research/e8-bit-elimination-reuse/code/provenance.py", + "blob": "9bfcb106230e454d9405ce5eb42dd2218d905ea6" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr445.json b/research/e8-bit-carrier-skeleton/SOURCE-pr445.json new file mode 100644 index 0000000000..ae29de391a --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr445.json @@ -0,0 +1,25 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/445", + "head_repository": "chafreaky/integer-mult-bounds", + "commit": "40ab91daf2b5e87fc4071dedae1699d5d7e7cecc", + "note": "PR #445 (chafreaky, with OpenAI Codex assistance): eleven-stage compressed bit geometry, elementary orthogonal-cover row bound, and its eleven-stage emitter and frozen hosting selection (used unchanged for the PR #445 R740 control). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "code/hub/r740-hosted-eleven/code/geometry.py": { + "source_path": "research/r740-hosted-eleven/code/geometry.py", + "blob": "b4ad5074014dc00a01143910eb1cd27fafe0e15c" + }, + "code/hub/r740-hosted-eleven/code/row_bound.py": { + "source_path": "research/r740-hosted-eleven/code/row_bound.py", + "blob": "11d3c0d48e4ea5a02ac3b6689f3c7d36f2972eb8" + }, + "code/hub/r740-hosted-eleven/code/emit.py": { + "source_path": "research/r740-hosted-eleven/code/emit.py", + "blob": "5ff0de0d6f088ac95e25a2a7aed8653e8cd0333e" + }, + "code/hub/r740-hosted-eleven/data/selection.json": { + "source_path": "research/r740-hosted-eleven/data/selection.json", + "blob": "8e548e5a9204a909d539ba36b866804b256d4c2b" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr448.json b/research/e8-bit-carrier-skeleton/SOURCE-pr448.json new file mode 100644 index 0000000000..3648ab3692 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr448.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/448", + "head_repository": "higherbeing/integer-mult-bounds", + "commit": "359022bcd71143e45d48def0dd005bf67f339aa7", + "note": "PR #448: its EXPECTED.json receipt (cited complex b). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr448/EXPECTED.json": { + "source_path": "research/cross-copy-hosting/EXPECTED.json", + "blob": "1574e6488b6fc59191ae49fcc0c089e48b196fbd" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr451.json b/research/e8-bit-carrier-skeleton/SOURCE-pr451.json new file mode 100644 index 0000000000..fbd9881e09 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr451.json @@ -0,0 +1,25 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/451", + "head_repository": "chafreaky/integer-mult-bounds", + "commit": "f3a38153678b55063fc005901cc968266166507d", + "note": "PR #451 (chafreaky, with OpenAI Codex assistance): its eleven-stage bit emitter (byte-identical to PR #445's), frozen hosting selection, R740 rank149 word and residual isometries, used unchanged for the PR #451 control. Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "code/hub/r740-hosted-rank149/code/emit.py": { + "source_path": "research/r740-hosted-rank149/code/emit.py", + "blob": "5ff0de0d6f088ac95e25a2a7aed8653e8cd0333e" + }, + "code/hub/r740-hosted-rank149/data/selection.json": { + "source_path": "research/r740-hosted-rank149/data/selection.json", + "blob": "c57069f7385c3b6aff4fe3c73c0a21bae727c76f" + }, + "code/hub/r740-hosted-rank149/data/word.json.gz": { + "source_path": "research/r740-hosted-rank149/data/word.json.gz", + "blob": "3c8489a29f0de2cad7dafaddc340a1ff197d5172" + }, + "code/hub/r740-hosted-rank149/data/residual-isometries.json": { + "source_path": "research/r740-hosted-rank149/data/residual-isometries.json", + "blob": "ec8b4131d203d7a288ca078ca559f922d38fe9d2" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr458.json b/research/e8-bit-carrier-skeleton/SOURCE-pr458.json new file mode 100644 index 0000000000..c36c74cbea --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr458.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/458", + "head_repository": "chafreaky/integer-mult-bounds", + "commit": "44e9eae8287951c1e6dbbd3c553f5743fe2240b0", + "note": "PR #458: its EXPECTED.json receipt (cited complex b). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr458/EXPECTED.json": { + "source_path": "research/e8-complex-adapted-kernel/EXPECTED.json", + "blob": "e06a17c177eee0e0962c96ea61554239ef38ef4d" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr471.json b/research/e8-bit-carrier-skeleton/SOURCE-pr471.json new file mode 100644 index 0000000000..0dc019cfb1 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr471.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/471", + "head_repository": "Dugongue/integer-mult-bounds", + "commit": "56b3da6aa1295d37ce43f1753479bfe4737b7ac3", + "note": "PR #471: its EXPECTED.json receipt (cited complex b). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr471/EXPECTED.json": { + "source_path": "research/e8-tensor-normalization/EXPECTED.json", + "blob": "ed1e72239ebebdbfad847fb817e5546f980c1d8d" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr472.json b/research/e8-bit-carrier-skeleton/SOURCE-pr472.json new file mode 100644 index 0000000000..31acb027ec --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr472.json @@ -0,0 +1,73 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/472", + "head_repository": "chafreaky/integer-mult-bounds", + "commit": "259c68488b7aa8a14cf3fcae7fc499381c9bf729", + "note": "PR #472 (chafreaky, with OpenAI Codex assistance) and the files its branch carries unchanged: research/e8-r715-whole-hosted (PR #472: eight-replica pooled whole-residual emitter, independent audit, local projector audit, assembly, R715 word, isometries, frozen hosting); research/e8-r740-replica32 (PR #443, chafreaky: bank routes, tiling, engine wrapper, the R740 rank138 word and its isometries; PR #315 engines by DreamingOfClouds); research/idle-axis-hosting/hosting_core.py (PR #442, DaysSky). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "code/hub/e8-r740-replica32/code/bank_routes.py": { + "source_path": "research/e8-r740-replica32/code/bank_routes.py", + "blob": "9e43a876664a26899762f3b8e9a582e684a3650a" + }, + "code/hub/e8-r740-replica32/code/tile_m.py": { + "source_path": "research/e8-r740-replica32/code/tile_m.py", + "blob": "cd5fd9b5399f5e7afe5d2a95bd3504bd543c0d60" + }, + "code/hub/e8-r740-replica32/code/e8core.py": { + "source_path": "research/e8-r740-replica32/code/e8core.py", + "blob": "78983b368715e89fe8524a6dd2c13585d2b5394e" + }, + "code/hub/e8-r740-replica32/code/engines/moment.py": { + "source_path": "research/e8-r740-replica32/code/engines/moment.py", + "blob": "7d697cb45203fe72d97037403d6da41f71f3b7fd" + }, + "code/hub/e8-r740-replica32/code/engines/base_two_moment.py": { + "source_path": "research/e8-r740-replica32/code/engines/base_two_moment.py", + "blob": "14a90fa0e788217856f070382c9e61bd7c603c61" + }, + "code/hub/e8-r740-replica32/code/engines/outer.py": { + "source_path": "research/e8-r740-replica32/code/engines/outer.py", + "blob": "43007488ad2c43187c77cc6798beff8b1cd76ad2" + }, + "code/hub/e8-r740-replica32/data/word.json.gz": { + "source_path": "research/e8-r740-replica32/data/word.json.gz", + "blob": "85390b07e4747feddbf2e16f94b5e0a8a308c191" + }, + "code/hub/e8-r740-replica32/data/residual-isometries.json": { + "source_path": "research/e8-r740-replica32/data/residual-isometries.json", + "blob": "9b8b35cb1528a978e209e1098864cae48c57fd93" + }, + "code/hub/idle-axis-hosting/hosting_core.py": { + "source_path": "research/idle-axis-hosting/hosting_core.py", + "blob": "68b536daa9e6546c0aa046934bf840aaa3c3fde3" + }, + "code/hub/e8-r715-whole-hosted/code/emit.py": { + "source_path": "research/e8-r715-whole-hosted/code/emit.py", + "blob": "df74ad698a98419e828b37d4dfd7c036fc49a890" + }, + "code/hub/e8-r715-whole-hosted/code/audit.py": { + "source_path": "research/e8-r715-whole-hosted/code/audit.py", + "blob": "155b61f2944116423a5be6ae666276e1c1827fe5" + }, + "code/hub/e8-r715-whole-hosted/code/local_audit.py": { + "source_path": "research/e8-r715-whole-hosted/code/local_audit.py", + "blob": "931f884920125b334412f70cf30d9517b084dc7a" + }, + "code/hub/e8-r715-whole-hosted/code/assemble.py": { + "source_path": "research/e8-r715-whole-hosted/code/assemble.py", + "blob": "cd60b4bcfae515fccd7f21fd1ff5a7114a132eb9" + }, + "code/hub/e8-r715-whole-hosted/data/word.json.gz": { + "source_path": "research/e8-r715-whole-hosted/data/word.json.gz", + "blob": "f7d55b8bd45d385011ced25e632a3d922bb77bba" + }, + "code/hub/e8-r715-whole-hosted/data/residual-isometries.json": { + "source_path": "research/e8-r715-whole-hosted/data/residual-isometries.json", + "blob": "5864e4d680035401d53d32adab0369046d80b171" + }, + "code/hub/e8-r715-whole-hosted/data/hosting.json": { + "source_path": "research/e8-r715-whole-hosted/data/hosting.json", + "blob": "381fb06ccbe055f4fbdc7544dcf8c0bae8f96701" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr473.json b/research/e8-bit-carrier-skeleton/SOURCE-pr473.json new file mode 100644 index 0000000000..821caf8f07 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr473.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/473", + "head_repository": "rohanarun/integer-mult-bounds", + "commit": "c7590f1d861f0eaae725cc79901445385aab9125", + "note": "PR #473: its EXPECTED.json receipt (cited complex b; frontier kappa). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr473/EXPECTED.json": { + "source_path": "research/r715-replica84-complex79/EXPECTED.json", + "blob": "45ee9fde7fdf6b19b6303372068977201b4ef61c" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr478.json b/research/e8-bit-carrier-skeleton/SOURCE-pr478.json new file mode 100644 index 0000000000..608323ccbe --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr478.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/478", + "head_repository": "Dugongue/integer-mult-bounds", + "commit": "bea1d52fd330c699903f81612ee58be81697d1eb", + "note": "PR #478: its EXPECTED.json receipt (cited complex b; frontier kappa). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr478/EXPECTED.json": { + "source_path": "research/tensor-r715-next/EXPECTED.json", + "blob": "77f5805cd8125602e8c50f4eaba1691440c611c2" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr483.json b/research/e8-bit-carrier-skeleton/SOURCE-pr483.json new file mode 100644 index 0000000000..817396d9c8 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr483.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/483", + "head_repository": "Dugongue/integer-mult-bounds", + "commit": "3738c3ce2d04d6a6c6363408ff9402286f592bc7", + "note": "PR #483: its EXPECTED.json receipt (cited complex b; frontier kappa). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr483/EXPECTED.json": { + "source_path": "research/tensor-response-r715/EXPECTED.json", + "blob": "f7ff643cd54a334bf46c82989ba155eb6e69adde" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/SOURCE-pr484.json b/research/e8-bit-carrier-skeleton/SOURCE-pr484.json new file mode 100644 index 0000000000..76292df851 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/SOURCE-pr484.json @@ -0,0 +1,13 @@ +{ + "schema": "source-pins/1", + "source": "https://github.com/CrocSwap/integer-mult-bounds/pull/484", + "head_repository": "DreamingOfClouds/integer-mult-bounds", + "commit": "035845ce95f31d0a2dcfb42b8c8e13411271fa5f", + "note": "PR #484: its EXPECTED.json receipt (cited complex b). Every file listed has, in this package, the git blob id it has at the commit above (git ls-tree -r -- ).", + "identical": { + "data/complex/pr484/EXPECTED.json": { + "source_path": "research/e8-complex-gauge-kernel/EXPECTED.json", + "blob": "7f93fcbb9f1c2799fd86dd308ec1e6f0ad2a3264" + } + } +} diff --git a/research/e8-bit-carrier-skeleton/code/bit/checkers/columns_h.cpp b/research/e8-bit-carrier-skeleton/code/bit/checkers/columns_h.cpp new file mode 100644 index 0000000000..00c5a3a5d8 --- /dev/null +++ b/research/e8-bit-carrier-skeleton/code/bit/checkers/columns_h.cpp @@ -0,0 +1,48 @@ +// Generalization (Dylan Crow, with Anthropic Claude assistance): the copied-centre count is the macro NCOPY, defaulting to +// HDIM, so the unmodified PR #346/#352 build (no -DNCOPY) is exactly the original checker. The E8 bit word has 9 +// retained totals at h = 8 (-DNCOPY=9). +#ifndef NCOPY +#define NCOPY HDIM +#endif +#include "json.hpp" +#include +#include +using boost::multiprecision::cpp_int; +#include +#include +#include +#include +#include +#include +#include +using J=nlohmann::json; +struct E{int kind,dst,src,c;}; +void need(bool x,const char*s){if(!x)throw std::runtime_error(s);} +int main(int argc,char**argv){try{ +need(argc==3,"usage RAW6_RECORDS OUTPUT");std::string pre=argv[1];int v=VPORTS,r=RHELP,loc=2*v+r,global=4*v+r,temp=global; +struct Raw{int op,a,b,c,f,z;};std::ifstream f(pre,std::ios::binary|std::ios::ate);size_t sz=f.tellg();need(sz%sizeof(Raw)==0,"stream alignment");std::vectorp(sz/sizeof(Raw));f.seekg(0);f.read((char*)p.data(),sz);std::vectore;std::mapH;for(auto q:p){if(q.op==0){if(q.f)H[q.f]++;}else if(q.op==1)e.push_back({0,q.a,q.b,q.c});else if(q.op==2){H[q.z]++;e.push_back({1,loc,q.a,0});}else if(q.op==3)e.push_back({2,loc,q.a,0});else need(false,"opcode");} +J prefix=J::array();cpp_int largestF=0,largestB=0;for(int rev=0;rev<2;rev++){std::vectornorms(loc+1,1);cpp_int maxrow=1;bool isopen=false;for(size_t z=0;zmaxrow)maxrow=norms[q.dst];}else if(k==1){need(!isopen,"boundcopy");norms[loc]=norms[q.src];isopen=true;}else {need(isopen,"bounderase");norms[loc]=0;isopen=false;}}need(!isopen,"prefix copy closure");if(rev)largestB=maxrow;else largestF=maxrow;prefix.push_back({{"reverse",bool(rev)},{"cancellation_free_signed_row_l1_upper",maxrow.convert_to()},{"bits",boost::multiprecision::msb(maxrow)+1}});} +cpp_int payload=64*largestF*largestF*largestF*largestB*largestB;need(payload<(cpp_int(1)<<104),"payloadfiniteprefix2^104"); +long long copies=0,adds=0,odd=0;bool open=false;int center=-1;long long reverseCopies=0; +for(auto q:e){need(q.kind>=0&&q.kind<=2,"kind");need(q.dst>=0&&q.dst<=loc,"local dst");if(q.kind==0){need(q.src>=0&&q.src<=loc&&q.dst!=q.src,"source distinct");need(q.dst!=loc,"copy immutable");need(q.src!=loc||open,"temp not open");if(open)need(q.dst!=center,"source changes inside copied-center block");adds++;odd+=q.c&1;} +else if(q.kind==1){need(!open&&q.dst==loc&&q.src>=0&&q.srca((size_t)(global+1)*words);auto row=[&](int i){return a.data()+(size_t)i*words;};for(int i=0;i=v&&i<2*v&&w==(size_t)(i-v)/64)want^=1ull<<((i-v)%64);need(x[w]==want,"local defining-decoder full formal column");}}} +if(stage==1||stage==2||stage==4){int b=stage==1?0:stage==2?1:2;for(auto q:bridges[b])for(int i=0;i(std::chrono::steady_clock::now()-t0).count()<<"s\n";} +for(int bank=0;bank<4;bank+=2)for(int i=0;i()},{"payload_prefix_bits",boost::multiprecision::msb(payload)+1},{"new_Q_categories",{28,29}},{"local_raw_H",H},{"negative_controls",controls},{"seconds",std::chrono::duration(std::chrono::steady_clock::now()-t0).count()}};std::ofstream(argv[2])< +#include +using boost::multiprecision::cpp_int; +#include +#include +#include +#include +#include +#include +#include +using J=nlohmann::json; +struct E{int kind,dst,src,c;}; +void need(bool x,const char*s){if(!x)throw std::runtime_error(s);} +int main(int argc,char**argv){try{ +need(argc==3,"usage RAW6_RECORDS OUTPUT");std::string pre=argv[1];int v=VPORTS,r=RHELP,loc=2*v+r,global=2*KPAIRS*v+r,temp=global;const int S=2*KPAIRS+1; +struct Raw{int op,a,b,c,f,z;};std::ifstream f(pre,std::ios::binary|std::ios::ate);size_t sz=f.tellg();need(sz%sizeof(Raw)==0,"stream alignment");std::vectorp(sz/sizeof(Raw));f.seekg(0);f.read((char*)p.data(),sz);std::vectore;std::mapH;for(auto q:p){if(q.op==0){if(q.f)H[q.f]++;}else if(q.op==1)e.push_back({0,q.a,q.b,q.c});else if(q.op==2){H[q.z]++;e.push_back({1,loc,q.a,0});}else if(q.op==3)e.push_back({2,loc,q.a,0});else need(false,"opcode");} +J prefix=J::array();cpp_int largestF=0,largestB=0;for(int rev=0;rev<2;rev++){std::vectornorms(loc+1,1);cpp_int maxrow=1;bool isopen=false;for(size_t z=0;zmaxrow)maxrow=norms[q.dst];}else if(k==1){need(!isopen,"boundcopy");norms[loc]=norms[q.src];isopen=true;}else {need(isopen,"bounderase");norms[loc]=0;isopen=false;}}need(!isopen,"prefix copy closure");if(rev)largestB=maxrow;else largestF=maxrow;prefix.push_back({{"reverse",bool(rev)},{"cancellation_free_signed_row_l1_upper",maxrow.convert_to()},{"bits",boost::multiprecision::msb(maxrow)+1}});} +cpp_int payload=64*largestF*largestF*largestF*largestB*largestB;need(payload<(cpp_int(1)<<104),"payloadfiniteprefix2^104"); +long long copies=0,adds=0,odd=0;bool open=false;int center=-1;long long reverseCopies=0; +for(auto q:e){need(q.kind>=0&&q.kind<=2,"kind");need(q.dst>=0&&q.dst<=loc,"local dst");if(q.kind==0){need(q.src>=0&&q.src<=loc&&q.dst!=q.src,"source distinct");need(q.dst!=loc,"copy immutable");need(q.src!=loc||open,"temp not open");if(open)need(q.dst!=center,"source changes inside copied-center block");adds++;odd+=q.c&1;} +else if(q.kind==1){need(!open&&q.dst==loc&&q.src>=0&&q.src>active;std::vectorbackward;std::vector>>after(S); +auto X=[](int p){return 2*(p-1);};auto Y=[](int p){return 2*(p-1)+1;}; +for(int t=0;t=3&&t%2==1);backward.push_back(b);active.push_back(b?std::array{Y(p),X(p)}:std::array{X(p),Y(p)});} +for(int q=2;q<=KPAIRS;q++){after[2*q-3].push_back({X(q-1),X(q),1});after[2*q-3].push_back({Y(q),Y(q-1),-1}); + after[2*q-2].push_back({Y(q),Y(q-1),1});after[2*q-2].push_back({X(q-1),X(q),-1});} +for(int p=KPAIRS;p>=2;p--){after[S-1].push_back({Y(p-1),Y(p),-1});after[S-1].push_back({X(p),X(p-1),1});} +int nbridges=0;for(auto&a:after)nbridges+=a.size();need(nbridges==6*(KPAIRS-1),"twin bridge count"); +size_t words=(global+63)/64;std::vectora((size_t)(global+1)*words);auto row=[&](int i){return a.data()+(size_t)i*words;};for(int i=0;i=v&&i<2*v&&w==(size_t)(i-v)/64)want^=1ull<<((i-v)%64);need(x[w]==want,"local defining-decoder full formal column");}}} +for(auto q:after[stage])for(int i=0;i(std::chrono::steady_clock::now()-t0).count()<<"s\n";} +for(int bank=0;bank<2*KPAIRS;bank+=2)for(int i=0;ib(2*KPAIRS);for(int z=0;z<2*KPAIRS;z++)b[z]=1u<()},{"payload_prefix_bits",boost::multiprecision::msb(payload)+1},{"new_Q_categories",{28,29}},{"local_raw_H",H},{"negative_controls",controls},{"seconds",std::chrono::duration(std::chrono::steady_clock::now()-t0).count()}};std::ofstream(argv[2])</2 in Construction-A (Hamming) coordinates, integer Gram 2 B G B^t = B B^t +Checks per frame: rank(B) = dim, A.B = 0 and |A| + dim = h (when A given), det(integer Gram) != 0 (exact Bareiss), and +the prime witness: |det| = residual * prod p^e over PR #315's allowed primes with 0 < residual < 2^80. With --new BASE +only frames absent from BASE are checked (prime_new.py's scope); otherwise every frame. +usage: python3 gram_frames.py WORDDIR --gram {triple9,e8ham} --h H [--new BASEDIR] [--positive]""" +import json, sys, argparse, importlib.util, os, collections +ap=argparse.ArgumentParser(); ap.add_argument('word'); ap.add_argument('--gram',required=True); ap.add_argument('--h',type=int,required=True) +ap.add_argument('--new'); ap.add_argument('--positive',action='store_true'); a=ap.parse_args() +HERE=os.path.dirname(os.path.abspath(__file__)) +s=importlib.util.spec_from_file_location('pw',os.path.join(HERE,'..','..','pricing','prime_witnesses.py')); pw=importlib.util.module_from_spec(s); s.loader.exec_module(pw) +def validate_record(row, dimension, determinant, allowed_primes): # PR #315 prime_check.validate_record, verbatim logic + assert type(row['dimension']) is int and type(row['determinant']) is int and type(row['residual']) is int, 'exact integer witness fields' + assert row['dimension'] == dimension and row['determinant'] == determinant != 0, 'exact determinant mismatch or singular basis' + assert 0 < row['residual'] < 2**80, 'retained prime lower bound' + product = row['residual'] + for prime, exponent in row['factors'].items(): + q = int(prime); assert q in allowed_primes and type(exponent) is int and exponent > 0, 'factor shape'; product *= q**exponent + assert product == abs(determinant), 'factor identity' +def gram(B): + if a.gram=='triple9': + s_=list(map(sum,B)); return [[9*sum(x*y for x,y in zip(B[i],B[j]))-s_[i]*s_[j] for j in range(len(B))] for i in range(len(B))] + if a.gram=='e8ham': + return [[sum(x*y for x,y in zip(B[i],B[j])) for j in range(len(B))] for i in range(len(B))] + raise SystemExit('unknown gram') +def rank_int(B): + M=[r[:] for r in B]; r=0 + for c in range(len(M[0]) if M else 0): + p=next((i for i in range(r,len(M)) if M[i][c]!=0),None) + if p is None: continue + M[r],M[p]=M[p],M[r] + for i in range(len(M)): + if i!=r and M[i][c]!=0: x,y=M[r][c],M[i][c]; M[i]=[u*x-w*y for u,w in zip(M[i],M[r])] + r+=1 + return r +fr=json.load(open(a.word+'/frames.json'))['frames'] +old=json.load(open(a.new+'/frames.json'))['frames'] if a.new else {} +keys=[k for k in fr if k not in old] +stats=collections.Counter(); primes=set(); bits=0; nonpos=0 +for k in keys: + B=fr[k]['B']; A=fr[k].get('A',[]); d=len(B); assert fr[k]['dim']==d + assert d==0 or rank_int(B)==d,('basis rank',k) + if A: assert all(sum(x*y for x,y in zip(r,b))==0 for r in A for b in B) and len(A)+d==a.h,('annihilator',k) + M=gram(B) if d else []; det=pw.det(M); assert det!=0,('degenerate frame',k) + if a.positive: # positive-definite ambient form: every leading principal minor positive + for j in range(1,d+1): + if pw.det([r[:j] for r in M[:j]])<=0: nonpos+=1; break + powers,residual=pw.factor_witness(det); row=dict(dimension=d,determinant=det,residual=residual,factors={p:e for p,e in powers.items() if e}) + validate_record(row,d,det,pw.PRIMES); primes.update(map(int,row['factors'])); bits=max(bits,abs(det).bit_length()); stats[d]+=1 +assert nonpos==0 +print('PASS %s Gram: %d frames checked, all nondegenerate%s; prime witnesses valid; max determinant bits %d; primes %s; by dim %s'%( + a.gram,sum(stats.values()),' and positive definite' if a.positive else '',bits,sorted(primes),dict(sorted(stats.items())))) diff --git a/research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp b/research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp new file mode 100644 index 0000000000..82d69f7c5d --- /dev/null +++ b/research/e8-bit-carrier-skeleton/code/bit/checkers/json.hpp @@ -0,0 +1,25526 @@ +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +/****************************************************************************\ + * Note on documentation: The source files contain links to the online * + * documentation of the public API at https://json.nlohmann.me. This URL * + * contains the most recent documentation and should also be applicable to * + * previous versions; documentation for deprecated functions is not * + * removed, but marked deprecated. See "Generate documentation" section in * + * file docs/README.md. * +\****************************************************************************/ + +#ifndef INCLUDE_NLOHMANN_JSON_HPP_ +#define INCLUDE_NLOHMANN_JSON_HPP_ + +#include // all_of, find, for_each +#include // nullptr_t, ptrdiff_t, size_t +#include // hash, less +#include // initializer_list +#ifndef JSON_NO_IO + #include // istream, ostream +#endif // JSON_NO_IO +#include // random_access_iterator_tag +#include // unique_ptr +#include // string, stoi, to_string +#include // declval, forward, move, pair, swap +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// This file contains all macro definitions affecting or depending on the ABI + +#ifndef JSON_SKIP_LIBRARY_VERSION_CHECK + #if defined(NLOHMANN_JSON_VERSION_MAJOR) && defined(NLOHMANN_JSON_VERSION_MINOR) && defined(NLOHMANN_JSON_VERSION_PATCH) + #if NLOHMANN_JSON_VERSION_MAJOR != 3 || NLOHMANN_JSON_VERSION_MINOR != 12 || NLOHMANN_JSON_VERSION_PATCH != 0 + #warning "Already included a different version of the library!" + #endif + #endif +#endif + +#define NLOHMANN_JSON_VERSION_MAJOR 3 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_MINOR 12 // NOLINT(modernize-macro-to-enum) +#define NLOHMANN_JSON_VERSION_PATCH 0 // NOLINT(modernize-macro-to-enum) + +#ifndef JSON_DIAGNOSTICS + #define JSON_DIAGNOSTICS 0 +#endif + +#ifndef JSON_DIAGNOSTIC_POSITIONS + #define JSON_DIAGNOSTIC_POSITIONS 0 +#endif + +#ifndef JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON 0 +#endif + +#if JSON_DIAGNOSTICS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS _diag +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS +#endif + +#if JSON_DIAGNOSTIC_POSITIONS + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS _dp +#else + #define NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS +#endif + +#if JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON _ldvcmp +#else + #define NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_NO_VERSION + #define NLOHMANN_JSON_NAMESPACE_NO_VERSION 0 +#endif + +// Construct the namespace ABI tags component +#define NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) json_abi ## a ## b ## c +#define NLOHMANN_JSON_ABI_TAGS_CONCAT(a, b, c) \ + NLOHMANN_JSON_ABI_TAGS_CONCAT_EX(a, b, c) + +#define NLOHMANN_JSON_ABI_TAGS \ + NLOHMANN_JSON_ABI_TAGS_CONCAT( \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTICS, \ + NLOHMANN_JSON_ABI_TAG_LEGACY_DISCARDED_VALUE_COMPARISON, \ + NLOHMANN_JSON_ABI_TAG_DIAGNOSTIC_POSITIONS) + +// Construct the namespace version component +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) \ + _v ## major ## _ ## minor ## _ ## patch +#define NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(major, minor, patch) \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT_EX(major, minor, patch) + +#if NLOHMANN_JSON_NAMESPACE_NO_VERSION +#define NLOHMANN_JSON_NAMESPACE_VERSION +#else +#define NLOHMANN_JSON_NAMESPACE_VERSION \ + NLOHMANN_JSON_NAMESPACE_VERSION_CONCAT(NLOHMANN_JSON_VERSION_MAJOR, \ + NLOHMANN_JSON_VERSION_MINOR, \ + NLOHMANN_JSON_VERSION_PATCH) +#endif + +// Combine namespace components +#define NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) a ## b +#define NLOHMANN_JSON_NAMESPACE_CONCAT(a, b) \ + NLOHMANN_JSON_NAMESPACE_CONCAT_EX(a, b) + +#ifndef NLOHMANN_JSON_NAMESPACE +#define NLOHMANN_JSON_NAMESPACE \ + nlohmann::NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_BEGIN +#define NLOHMANN_JSON_NAMESPACE_BEGIN \ + namespace nlohmann \ + { \ + inline namespace NLOHMANN_JSON_NAMESPACE_CONCAT( \ + NLOHMANN_JSON_ABI_TAGS, \ + NLOHMANN_JSON_NAMESPACE_VERSION) \ + { +#endif + +#ifndef NLOHMANN_JSON_NAMESPACE_END +#define NLOHMANN_JSON_NAMESPACE_END \ + } /* namespace (inline namespace) NOLINT(readability/namespace) */ \ + } // namespace nlohmann +#endif + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // transform +#include // array +#include // forward_list +#include // inserter, front_inserter, end +#include // map +#ifdef JSON_HAS_CPP_17 + #include // optional +#endif +#include // string +#include // tuple, make_tuple +#include // is_arithmetic, is_same, is_enum, underlying_type, is_convertible +#include // unordered_map +#include // pair, declval +#include // valarray + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // nullptr_t +#include // exception +#if JSON_DIAGNOSTICS + #include // accumulate +#endif +#include // runtime_error +#include // to_string +#include // vector + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // array +#include // size_t +#include // uint8_t +#include // string + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // declval, pair +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template struct make_void +{ + using type = void; +}; +template using void_t = typename make_void::type; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +// https://en.cppreference.com/w/cpp/experimental/is_detected +struct nonesuch +{ + nonesuch() = delete; + ~nonesuch() = delete; + nonesuch(nonesuch const&) = delete; + nonesuch(nonesuch const&&) = delete; + void operator=(nonesuch const&) = delete; + void operator=(nonesuch&&) = delete; +}; + +template class Op, + class... Args> +struct detector +{ + using value_t = std::false_type; + using type = Default; +}; + +template class Op, class... Args> +struct detector>, Op, Args...> +{ + using value_t = std::true_type; + using type = Op; +}; + +template class Op, class... Args> +using is_detected = typename detector::value_t; + +template class Op, class... Args> +struct is_detected_lazy : is_detected { }; + +template class Op, class... Args> +using detected_t = typename detector::type; + +template class Op, class... Args> +using detected_or = detector; + +template class Op, class... Args> +using detected_or_t = typename detected_or::type; + +template class Op, class... Args> +using is_detected_exact = std::is_same>; + +template class Op, class... Args> +using is_detected_convertible = + std::is_convertible, To>; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + + +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2016 - 2021 Evan Nemerson +// SPDX-License-Identifier: MIT + +/* Hedley - https://nemequ.github.io/hedley + * Created by Evan Nemerson + */ + +#if !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < 15) +#if defined(JSON_HEDLEY_VERSION) + #undef JSON_HEDLEY_VERSION +#endif +#define JSON_HEDLEY_VERSION 15 + +#if defined(JSON_HEDLEY_STRINGIFY_EX) + #undef JSON_HEDLEY_STRINGIFY_EX +#endif +#define JSON_HEDLEY_STRINGIFY_EX(x) #x + +#if defined(JSON_HEDLEY_STRINGIFY) + #undef JSON_HEDLEY_STRINGIFY +#endif +#define JSON_HEDLEY_STRINGIFY(x) JSON_HEDLEY_STRINGIFY_EX(x) + +#if defined(JSON_HEDLEY_CONCAT_EX) + #undef JSON_HEDLEY_CONCAT_EX +#endif +#define JSON_HEDLEY_CONCAT_EX(a,b) a##b + +#if defined(JSON_HEDLEY_CONCAT) + #undef JSON_HEDLEY_CONCAT +#endif +#define JSON_HEDLEY_CONCAT(a,b) JSON_HEDLEY_CONCAT_EX(a,b) + +#if defined(JSON_HEDLEY_CONCAT3_EX) + #undef JSON_HEDLEY_CONCAT3_EX +#endif +#define JSON_HEDLEY_CONCAT3_EX(a,b,c) a##b##c + +#if defined(JSON_HEDLEY_CONCAT3) + #undef JSON_HEDLEY_CONCAT3 +#endif +#define JSON_HEDLEY_CONCAT3(a,b,c) JSON_HEDLEY_CONCAT3_EX(a,b,c) + +#if defined(JSON_HEDLEY_VERSION_ENCODE) + #undef JSON_HEDLEY_VERSION_ENCODE +#endif +#define JSON_HEDLEY_VERSION_ENCODE(major,minor,revision) (((major) * 1000000) + ((minor) * 1000) + (revision)) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MAJOR) + #undef JSON_HEDLEY_VERSION_DECODE_MAJOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MAJOR(version) ((version) / 1000000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_MINOR) + #undef JSON_HEDLEY_VERSION_DECODE_MINOR +#endif +#define JSON_HEDLEY_VERSION_DECODE_MINOR(version) (((version) % 1000000) / 1000) + +#if defined(JSON_HEDLEY_VERSION_DECODE_REVISION) + #undef JSON_HEDLEY_VERSION_DECODE_REVISION +#endif +#define JSON_HEDLEY_VERSION_DECODE_REVISION(version) ((version) % 1000) + +#if defined(JSON_HEDLEY_GNUC_VERSION) + #undef JSON_HEDLEY_GNUC_VERSION +#endif +#if defined(__GNUC__) && defined(__GNUC_PATCHLEVEL__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#elif defined(__GNUC__) + #define JSON_HEDLEY_GNUC_VERSION JSON_HEDLEY_VERSION_ENCODE(__GNUC__, __GNUC_MINOR__, 0) +#endif + +#if defined(JSON_HEDLEY_GNUC_VERSION_CHECK) + #undef JSON_HEDLEY_GNUC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GNUC_VERSION) + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GNUC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION) + #undef JSON_HEDLEY_MSVC_VERSION +#endif +#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 140000000) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 10000000, (_MSC_FULL_VER % 10000000) / 100000, (_MSC_FULL_VER % 100000) / 100) +#elif defined(_MSC_FULL_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_FULL_VER / 1000000, (_MSC_FULL_VER % 1000000) / 10000, (_MSC_FULL_VER % 10000) / 10) +#elif defined(_MSC_VER) && !defined(__ICL) + #define JSON_HEDLEY_MSVC_VERSION JSON_HEDLEY_VERSION_ENCODE(_MSC_VER / 100, _MSC_VER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_MSVC_VERSION_CHECK) + #undef JSON_HEDLEY_MSVC_VERSION_CHECK +#endif +#if !defined(JSON_HEDLEY_MSVC_VERSION) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (0) +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 10000000) + (minor * 100000) + (patch))) +#elif defined(_MSC_VER) && (_MSC_VER >= 1200) + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_FULL_VER >= ((major * 1000000) + (minor * 10000) + (patch))) +#else + #define JSON_HEDLEY_MSVC_VERSION_CHECK(major,minor,patch) (_MSC_VER >= ((major * 100) + (minor))) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION) + #undef JSON_HEDLEY_INTEL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, __INTEL_COMPILER_UPDATE) +#elif defined(__INTEL_COMPILER) && !defined(__ICL) + #define JSON_HEDLEY_INTEL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER / 100, __INTEL_COMPILER % 100, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_VERSION) + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #undef JSON_HEDLEY_INTEL_CL_VERSION +#endif +#if defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) && defined(__ICL) + #define JSON_HEDLEY_INTEL_CL_VERSION JSON_HEDLEY_VERSION_ENCODE(__INTEL_COMPILER, __INTEL_COMPILER_UPDATE, 0) +#endif + +#if defined(JSON_HEDLEY_INTEL_CL_VERSION_CHECK) + #undef JSON_HEDLEY_INTEL_CL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_INTEL_CL_VERSION) + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_INTEL_CL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_INTEL_CL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION) + #undef JSON_HEDLEY_PGI_VERSION +#endif +#if defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__) + #define JSON_HEDLEY_PGI_VERSION JSON_HEDLEY_VERSION_ENCODE(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +#endif + +#if defined(JSON_HEDLEY_PGI_VERSION_CHECK) + #undef JSON_HEDLEY_PGI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PGI_VERSION) + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PGI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PGI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #undef JSON_HEDLEY_SUNPRO_VERSION +#endif +#if defined(__SUNPRO_C) && (__SUNPRO_C > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_C >> 16) & 0xf) * 10) + ((__SUNPRO_C >> 12) & 0xf), (((__SUNPRO_C >> 8) & 0xf) * 10) + ((__SUNPRO_C >> 4) & 0xf), (__SUNPRO_C & 0xf) * 10) +#elif defined(__SUNPRO_C) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_C >> 8) & 0xf, (__SUNPRO_C >> 4) & 0xf, (__SUNPRO_C) & 0xf) +#elif defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x1000) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((((__SUNPRO_CC >> 16) & 0xf) * 10) + ((__SUNPRO_CC >> 12) & 0xf), (((__SUNPRO_CC >> 8) & 0xf) * 10) + ((__SUNPRO_CC >> 4) & 0xf), (__SUNPRO_CC & 0xf) * 10) +#elif defined(__SUNPRO_CC) + #define JSON_HEDLEY_SUNPRO_VERSION JSON_HEDLEY_VERSION_ENCODE((__SUNPRO_CC >> 8) & 0xf, (__SUNPRO_CC >> 4) & 0xf, (__SUNPRO_CC) & 0xf) +#endif + +#if defined(JSON_HEDLEY_SUNPRO_VERSION_CHECK) + #undef JSON_HEDLEY_SUNPRO_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_SUNPRO_VERSION) + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_SUNPRO_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_SUNPRO_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION +#endif +#if defined(__EMSCRIPTEN__) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION JSON_HEDLEY_VERSION_ENCODE(__EMSCRIPTEN_major__, __EMSCRIPTEN_minor__, __EMSCRIPTEN_tiny__) +#endif + +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK) + #undef JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_EMSCRIPTEN_VERSION) + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_EMSCRIPTEN_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_EMSCRIPTEN_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION) + #undef JSON_HEDLEY_ARM_VERSION +#endif +#if defined(__CC_ARM) && defined(__ARMCOMPILER_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCOMPILER_VERSION / 1000000, (__ARMCOMPILER_VERSION % 1000000) / 10000, (__ARMCOMPILER_VERSION % 10000) / 100) +#elif defined(__CC_ARM) && defined(__ARMCC_VERSION) + #define JSON_HEDLEY_ARM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ARMCC_VERSION / 1000000, (__ARMCC_VERSION % 1000000) / 10000, (__ARMCC_VERSION % 10000) / 100) +#endif + +#if defined(JSON_HEDLEY_ARM_VERSION_CHECK) + #undef JSON_HEDLEY_ARM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_ARM_VERSION) + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_ARM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_ARM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION) + #undef JSON_HEDLEY_IBM_VERSION +#endif +#if defined(__ibmxl__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__ibmxl_version__, __ibmxl_release__, __ibmxl_modification__) +#elif defined(__xlC__) && defined(__xlC_ver__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, (__xlC_ver__ >> 8) & 0xff) +#elif defined(__xlC__) + #define JSON_HEDLEY_IBM_VERSION JSON_HEDLEY_VERSION_ENCODE(__xlC__ >> 8, __xlC__ & 0xff, 0) +#endif + +#if defined(JSON_HEDLEY_IBM_VERSION_CHECK) + #undef JSON_HEDLEY_IBM_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IBM_VERSION) + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IBM_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IBM_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_VERSION) + #undef JSON_HEDLEY_TI_VERSION +#endif +#if \ + defined(__TI_COMPILER_VERSION__) && \ + ( \ + defined(__TMS470__) || defined(__TI_ARM__) || \ + defined(__MSP430__) || \ + defined(__TMS320C2000__) \ + ) +#if (__TI_COMPILER_VERSION__ >= 16000000) + #define JSON_HEDLEY_TI_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif +#endif + +#if defined(JSON_HEDLEY_TI_VERSION_CHECK) + #undef JSON_HEDLEY_TI_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_VERSION) + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #undef JSON_HEDLEY_TI_CL2000_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C2000__) + #define JSON_HEDLEY_TI_CL2000_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL2000_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL2000_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL2000_VERSION) + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL2000_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL2000_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #undef JSON_HEDLEY_TI_CL430_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__MSP430__) + #define JSON_HEDLEY_TI_CL430_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL430_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL430_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL430_VERSION) + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL430_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL430_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #undef JSON_HEDLEY_TI_ARMCL_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && (defined(__TMS470__) || defined(__TI_ARM__)) + #define JSON_HEDLEY_TI_ARMCL_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION_CHECK) + #undef JSON_HEDLEY_TI_ARMCL_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_ARMCL_VERSION) + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_ARMCL_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #undef JSON_HEDLEY_TI_CL6X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__TMS320C6X__) + #define JSON_HEDLEY_TI_CL6X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL6X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL6X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL6X_VERSION) + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL6X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL6X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #undef JSON_HEDLEY_TI_CL7X_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__C7000__) + #define JSON_HEDLEY_TI_CL7X_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CL7X_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CL7X_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CL7X_VERSION) + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CL7X_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CL7X_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #undef JSON_HEDLEY_TI_CLPRU_VERSION +#endif +#if defined(__TI_COMPILER_VERSION__) && defined(__PRU__) + #define JSON_HEDLEY_TI_CLPRU_VERSION JSON_HEDLEY_VERSION_ENCODE(__TI_COMPILER_VERSION__ / 1000000, (__TI_COMPILER_VERSION__ % 1000000) / 1000, (__TI_COMPILER_VERSION__ % 1000)) +#endif + +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION_CHECK) + #undef JSON_HEDLEY_TI_CLPRU_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TI_CLPRU_VERSION) + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TI_CLPRU_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION) + #undef JSON_HEDLEY_CRAY_VERSION +#endif +#if defined(_CRAYC) + #if defined(_RELEASE_PATCHLEVEL) + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, _RELEASE_PATCHLEVEL) + #else + #define JSON_HEDLEY_CRAY_VERSION JSON_HEDLEY_VERSION_ENCODE(_RELEASE_MAJOR, _RELEASE_MINOR, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_CRAY_VERSION_CHECK) + #undef JSON_HEDLEY_CRAY_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_CRAY_VERSION) + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_CRAY_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_CRAY_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION) + #undef JSON_HEDLEY_IAR_VERSION +#endif +#if defined(__IAR_SYSTEMS_ICC__) + #if __VER__ > 1000 + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE((__VER__ / 1000000), ((__VER__ / 1000) % 1000), (__VER__ % 1000)) + #else + #define JSON_HEDLEY_IAR_VERSION JSON_HEDLEY_VERSION_ENCODE(__VER__ / 100, __VER__ % 100, 0) + #endif +#endif + +#if defined(JSON_HEDLEY_IAR_VERSION_CHECK) + #undef JSON_HEDLEY_IAR_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_IAR_VERSION) + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_IAR_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_IAR_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION) + #undef JSON_HEDLEY_TINYC_VERSION +#endif +#if defined(__TINYC__) + #define JSON_HEDLEY_TINYC_VERSION JSON_HEDLEY_VERSION_ENCODE(__TINYC__ / 1000, (__TINYC__ / 100) % 10, __TINYC__ % 100) +#endif + +#if defined(JSON_HEDLEY_TINYC_VERSION_CHECK) + #undef JSON_HEDLEY_TINYC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_TINYC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_TINYC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION) + #undef JSON_HEDLEY_DMC_VERSION +#endif +#if defined(__DMC__) + #define JSON_HEDLEY_DMC_VERSION JSON_HEDLEY_VERSION_ENCODE(__DMC__ >> 8, (__DMC__ >> 4) & 0xf, __DMC__ & 0xf) +#endif + +#if defined(JSON_HEDLEY_DMC_VERSION_CHECK) + #undef JSON_HEDLEY_DMC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_DMC_VERSION) + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_DMC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_DMC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #undef JSON_HEDLEY_COMPCERT_VERSION +#endif +#if defined(__COMPCERT_VERSION__) + #define JSON_HEDLEY_COMPCERT_VERSION JSON_HEDLEY_VERSION_ENCODE(__COMPCERT_VERSION__ / 10000, (__COMPCERT_VERSION__ / 100) % 100, __COMPCERT_VERSION__ % 100) +#endif + +#if defined(JSON_HEDLEY_COMPCERT_VERSION_CHECK) + #undef JSON_HEDLEY_COMPCERT_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_COMPCERT_VERSION) + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_COMPCERT_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_COMPCERT_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION) + #undef JSON_HEDLEY_PELLES_VERSION +#endif +#if defined(__POCC__) + #define JSON_HEDLEY_PELLES_VERSION JSON_HEDLEY_VERSION_ENCODE(__POCC__ / 100, __POCC__ % 100, 0) +#endif + +#if defined(JSON_HEDLEY_PELLES_VERSION_CHECK) + #undef JSON_HEDLEY_PELLES_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_PELLES_VERSION) + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_PELLES_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_PELLES_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #undef JSON_HEDLEY_MCST_LCC_VERSION +#endif +#if defined(__LCC__) && defined(__LCC_MINOR__) + #define JSON_HEDLEY_MCST_LCC_VERSION JSON_HEDLEY_VERSION_ENCODE(__LCC__ / 100, __LCC__ % 100, __LCC_MINOR__) +#endif + +#if defined(JSON_HEDLEY_MCST_LCC_VERSION_CHECK) + #undef JSON_HEDLEY_MCST_LCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_MCST_LCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_MCST_LCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION) + #undef JSON_HEDLEY_GCC_VERSION +#endif +#if \ + defined(JSON_HEDLEY_GNUC_VERSION) && \ + !defined(__clang__) && \ + !defined(JSON_HEDLEY_INTEL_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_ARM_VERSION) && \ + !defined(JSON_HEDLEY_CRAY_VERSION) && \ + !defined(JSON_HEDLEY_TI_VERSION) && \ + !defined(JSON_HEDLEY_TI_ARMCL_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL430_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL2000_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL6X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CL7X_VERSION) && \ + !defined(JSON_HEDLEY_TI_CLPRU_VERSION) && \ + !defined(__COMPCERT__) && \ + !defined(JSON_HEDLEY_MCST_LCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION JSON_HEDLEY_GNUC_VERSION +#endif + +#if defined(JSON_HEDLEY_GCC_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_VERSION_CHECK +#endif +#if defined(JSON_HEDLEY_GCC_VERSION) + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (JSON_HEDLEY_GCC_VERSION >= JSON_HEDLEY_VERSION_ENCODE(major, minor, patch)) +#else + #define JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_ATTRIBUTE +#endif +#if \ + defined(__has_attribute) && \ + ( \ + (!defined(JSON_HEDLEY_IAR_VERSION) || JSON_HEDLEY_IAR_VERSION_CHECK(8,5,9)) \ + ) +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) __has_attribute(attribute) +#else +# define JSON_HEDLEY_HAS_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_ATTRIBUTE +#endif +#if defined(__has_attribute) + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE +#endif +#if \ + defined(__has_cpp_attribute) && \ + defined(__cplusplus) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS) + #undef JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS +#endif +#if !defined(__cplusplus) || !defined(__has_cpp_attribute) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#elif \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION) && \ + (!defined(JSON_HEDLEY_SUNPRO_VERSION) || JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0)) && \ + (!defined(JSON_HEDLEY_MSVC_VERSION) || JSON_HEDLEY_MSVC_VERSION_CHECK(19,20,0)) + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(ns::attribute) +#else + #define JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(ns,attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE +#endif +#if defined(__has_cpp_attribute) && defined(__cplusplus) + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) __has_cpp_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_CPP_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_BUILTIN) + #undef JSON_HEDLEY_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_HAS_BUILTIN(builtin) __has_builtin(builtin) +#else + #define JSON_HEDLEY_HAS_BUILTIN(builtin) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_BUILTIN) + #undef JSON_HEDLEY_GNUC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GNUC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_BUILTIN) + #undef JSON_HEDLEY_GCC_HAS_BUILTIN +#endif +#if defined(__has_builtin) + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) __has_builtin(builtin) +#else + #define JSON_HEDLEY_GCC_HAS_BUILTIN(builtin,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_FEATURE) + #undef JSON_HEDLEY_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_HAS_FEATURE(feature) __has_feature(feature) +#else + #define JSON_HEDLEY_HAS_FEATURE(feature) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_FEATURE) + #undef JSON_HEDLEY_GNUC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GNUC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_FEATURE) + #undef JSON_HEDLEY_GCC_HAS_FEATURE +#endif +#if defined(__has_feature) + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) __has_feature(feature) +#else + #define JSON_HEDLEY_GCC_HAS_FEATURE(feature,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_EXTENSION) + #undef JSON_HEDLEY_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_HAS_EXTENSION(extension) __has_extension(extension) +#else + #define JSON_HEDLEY_HAS_EXTENSION(extension) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_EXTENSION) + #undef JSON_HEDLEY_GNUC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GNUC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_EXTENSION) + #undef JSON_HEDLEY_GCC_HAS_EXTENSION +#endif +#if defined(__has_extension) + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) __has_extension(extension) +#else + #define JSON_HEDLEY_GCC_HAS_EXTENSION(extension,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GNUC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE +#endif +#if defined(__has_declspec_attribute) + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) __has_declspec_attribute(attribute) +#else + #define JSON_HEDLEY_GCC_HAS_DECLSPEC_ATTRIBUTE(attribute,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_HAS_WARNING) + #undef JSON_HEDLEY_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_HAS_WARNING(warning) __has_warning(warning) +#else + #define JSON_HEDLEY_HAS_WARNING(warning) (0) +#endif + +#if defined(JSON_HEDLEY_GNUC_HAS_WARNING) + #undef JSON_HEDLEY_GNUC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GNUC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GNUC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_GCC_HAS_WARNING) + #undef JSON_HEDLEY_GCC_HAS_WARNING +#endif +#if defined(__has_warning) + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) __has_warning(warning) +#else + #define JSON_HEDLEY_GCC_HAS_WARNING(warning,major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + defined(__clang__) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,17) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(8,0,0) || \ + (JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) && defined(__C99_PRAGMA_OPERATOR)) + #define JSON_HEDLEY_PRAGMA(value) _Pragma(#value) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_PRAGMA(value) __pragma(value) +#else + #define JSON_HEDLEY_PRAGMA(value) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_PUSH) + #undef JSON_HEDLEY_DIAGNOSTIC_PUSH +#endif +#if defined(JSON_HEDLEY_DIAGNOSTIC_POP) + #undef JSON_HEDLEY_DIAGNOSTIC_POP +#endif +#if defined(__clang__) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("clang diagnostic pop") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH __pragma(warning(push)) + #define JSON_HEDLEY_DIAGNOSTIC_POP __pragma(warning(pop)) +#elif JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("pop") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("diag_push") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("diag_pop") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_PUSH _Pragma("warning(push)") + #define JSON_HEDLEY_DIAGNOSTIC_POP _Pragma("warning(pop)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_PUSH + #define JSON_HEDLEY_DIAGNOSTIC_POP +#endif + +/* JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_ +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat") +# if JSON_HEDLEY_HAS_WARNING("-Wc++17-extensions") +# if JSON_HEDLEY_HAS_WARNING("-Wc++1z-extensions") +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + _Pragma("clang diagnostic ignored \"-Wc++1z-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + _Pragma("clang diagnostic ignored \"-Wc++17-extensions\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# else +# define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(xpr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wc++98-compat\"") \ + xpr \ + JSON_HEDLEY_DIAGNOSTIC_POP +# endif +# endif +#endif +#if !defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(x) x +#endif + +#if defined(JSON_HEDLEY_CONST_CAST) + #undef JSON_HEDLEY_CONST_CAST +#endif +#if defined(__cplusplus) +# define JSON_HEDLEY_CONST_CAST(T, expr) (const_cast(expr)) +#elif \ + JSON_HEDLEY_HAS_WARNING("-Wcast-qual") || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_CONST_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_CONST_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_REINTERPRET_CAST) + #undef JSON_HEDLEY_REINTERPRET_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) (reinterpret_cast(expr)) +#else + #define JSON_HEDLEY_REINTERPRET_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_STATIC_CAST) + #undef JSON_HEDLEY_STATIC_CAST +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_STATIC_CAST(T, expr) (static_cast(expr)) +#else + #define JSON_HEDLEY_STATIC_CAST(T, expr) ((T) (expr)) +#endif + +#if defined(JSON_HEDLEY_CPP_CAST) + #undef JSON_HEDLEY_CPP_CAST +#endif +#if defined(__cplusplus) +# if JSON_HEDLEY_HAS_WARNING("-Wold-style-cast") +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wold-style-cast\"") \ + ((T) (expr)) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# elif JSON_HEDLEY_IAR_VERSION_CHECK(8,3,0) +# define JSON_HEDLEY_CPP_CAST(T, expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("diag_suppress=Pe137") \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_CPP_CAST(T, expr) ((T) (expr)) +# endif +#else +# define JSON_HEDLEY_CPP_CAST(T, expr) (expr) +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wdeprecated-declarations") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warning(disable:1478 1786)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:1478 1786)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1216,1444,1445") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED __pragma(warning(disable:4996)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1215,1444") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress 1291,1718") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && !defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,E_DEPRECATED_ATT,E_DEPRECATED_ATT_MESS)") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("error_messages(off,symdeprecated,symdeprecated2)") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("diag_suppress=Pe1444,Pe1215") +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,90,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED _Pragma("warn(disable:2241)") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("clang diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("warning(disable:161)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:161)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 1675") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("GCC diagnostic ignored \"-Wunknown-pragmas\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS __pragma(warning(disable:4068)) +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(16,9,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 163") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress=Pe161") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS _Pragma("diag_suppress 161") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-attributes") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("clang diagnostic ignored \"-Wunknown-attributes\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(4,6,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("warning(disable:1292)") +#elif JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:1292)) +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES __pragma(warning(disable:5030)) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(20,7,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097,1098") +#elif JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("error_messages(off,attrskipunsup)") +#elif \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1173") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress=Pe1097") +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES _Pragma("diag_suppress 1097") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_CPP_ATTRIBUTES +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wcast-qual") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("clang diagnostic ignored \"-Wcast-qual\"") +#elif JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("warning(disable:2203 2331)") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL _Pragma("GCC diagnostic ignored \"-Wcast-qual\"") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_CAST_QUAL +#endif + +#if defined(JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION) + #undef JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunused-function") + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("clang diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("GCC diagnostic ignored \"-Wunused-function\"") +#elif JSON_HEDLEY_MSVC_VERSION_CHECK(1,0,0) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION __pragma(warning(disable:4505)) +#elif JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION _Pragma("diag_suppress 3142") +#else + #define JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNUSED_FUNCTION +#endif + +#if defined(JSON_HEDLEY_DEPRECATED) + #undef JSON_HEDLEY_DEPRECATED +#endif +#if defined(JSON_HEDLEY_DEPRECATED_FOR) + #undef JSON_HEDLEY_DEPRECATED_FOR +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated("Since " # since)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated("Since " #since "; use " #replacement)) +#elif \ + (JSON_HEDLEY_HAS_EXTENSION(attribute_deprecated_with_message) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,13,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(18,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,3,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,3,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__("Since " #since))) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__("Since " #since "; use " #replacement))) +#elif defined(__cplusplus) && (__cplusplus >= 201402L) + #define JSON_HEDLEY_DEPRECATED(since) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since)]]) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[deprecated("Since " #since "; use " #replacement)]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(deprecated) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_DEPRECATED(since) __attribute__((__deprecated__)) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __attribute__((__deprecated__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_PELLES_VERSION_CHECK(6,50,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_DEPRECATED(since) __declspec(deprecated) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) __declspec(deprecated) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_DEPRECATED(since) _Pragma("deprecated") + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) _Pragma("deprecated") +#else + #define JSON_HEDLEY_DEPRECATED(since) + #define JSON_HEDLEY_DEPRECATED_FOR(since, replacement) +#endif + +#if defined(JSON_HEDLEY_UNAVAILABLE) + #undef JSON_HEDLEY_UNAVAILABLE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warning) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNAVAILABLE(available_since) __attribute__((__warning__("Not available until " #available_since))) +#else + #define JSON_HEDLEY_UNAVAILABLE(available_since) +#endif + +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT +#endif +#if defined(JSON_HEDLEY_WARN_UNUSED_RESULT_MSG) + #undef JSON_HEDLEY_WARN_UNUSED_RESULT_MSG +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(warn_unused_result) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_WARN_UNUSED_RESULT __attribute__((__warn_unused_result__)) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) __attribute__((__warn_unused_result__)) +#elif (JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) >= 201907L) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard(msg)]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(nodiscard) + #define JSON_HEDLEY_WARN_UNUSED_RESULT JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[nodiscard]]) +#elif defined(_Check_return_) /* SAL */ + #define JSON_HEDLEY_WARN_UNUSED_RESULT _Check_return_ + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) _Check_return_ +#else + #define JSON_HEDLEY_WARN_UNUSED_RESULT + #define JSON_HEDLEY_WARN_UNUSED_RESULT_MSG(msg) +#endif + +#if defined(JSON_HEDLEY_SENTINEL) + #undef JSON_HEDLEY_SENTINEL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(sentinel) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_SENTINEL(position) __attribute__((__sentinel__(position))) +#else + #define JSON_HEDLEY_SENTINEL(position) +#endif + +#if defined(JSON_HEDLEY_NO_RETURN) + #undef JSON_HEDLEY_NO_RETURN +#endif +#if JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NO_RETURN __noreturn +#elif \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L + #define JSON_HEDLEY_NO_RETURN _Noreturn +#elif defined(__cplusplus) && (__cplusplus >= 201103L) + #define JSON_HEDLEY_NO_RETURN JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[noreturn]]) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(noreturn) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,2,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NO_RETURN __attribute__((__noreturn__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_NO_RETURN _Pragma("does_not_return") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NO_RETURN _Pragma("FUNC_NEVER_RETURNS;") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NO_RETURN __attribute((noreturn)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NO_RETURN __declspec(noreturn) +#else + #define JSON_HEDLEY_NO_RETURN +#endif + +#if defined(JSON_HEDLEY_NO_ESCAPE) + #undef JSON_HEDLEY_NO_ESCAPE +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(noescape) + #define JSON_HEDLEY_NO_ESCAPE __attribute__((__noescape__)) +#else + #define JSON_HEDLEY_NO_ESCAPE +#endif + +#if defined(JSON_HEDLEY_UNREACHABLE) + #undef JSON_HEDLEY_UNREACHABLE +#endif +#if defined(JSON_HEDLEY_UNREACHABLE_RETURN) + #undef JSON_HEDLEY_UNREACHABLE_RETURN +#endif +#if defined(JSON_HEDLEY_ASSUME) + #undef JSON_HEDLEY_ASSUME +#endif +#if \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_ASSUME(expr) __assume(expr) +#elif JSON_HEDLEY_HAS_BUILTIN(__builtin_assume) + #define JSON_HEDLEY_ASSUME(expr) __builtin_assume(expr) +#elif \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #if defined(__cplusplus) + #define JSON_HEDLEY_ASSUME(expr) std::_nassert(expr) + #else + #define JSON_HEDLEY_ASSUME(expr) _nassert(expr) + #endif +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_unreachable) && (!defined(JSON_HEDLEY_ARM_VERSION))) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,5,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,10,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,5) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(10,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_UNREACHABLE() __builtin_unreachable() +#elif defined(JSON_HEDLEY_ASSUME) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif +#if !defined(JSON_HEDLEY_ASSUME) + #if defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, ((expr) ? 1 : (JSON_HEDLEY_UNREACHABLE(), 1))) + #else + #define JSON_HEDLEY_ASSUME(expr) JSON_HEDLEY_STATIC_CAST(void, expr) + #endif +#endif +#if defined(JSON_HEDLEY_UNREACHABLE) + #if \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (JSON_HEDLEY_STATIC_CAST(void, JSON_HEDLEY_ASSUME(0)), (value)) + #else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) JSON_HEDLEY_UNREACHABLE() + #endif +#else + #define JSON_HEDLEY_UNREACHABLE_RETURN(value) return (value) +#endif +#if !defined(JSON_HEDLEY_UNREACHABLE) + #define JSON_HEDLEY_UNREACHABLE() JSON_HEDLEY_ASSUME(0) +#endif + +JSON_HEDLEY_DIAGNOSTIC_PUSH +#if JSON_HEDLEY_HAS_WARNING("-Wpedantic") + #pragma clang diagnostic ignored "-Wpedantic" +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wc++98-compat-pedantic") && defined(__cplusplus) + #pragma clang diagnostic ignored "-Wc++98-compat-pedantic" +#endif +#if JSON_HEDLEY_GCC_HAS_WARNING("-Wvariadic-macros",4,0,0) + #if defined(__clang__) + #pragma clang diagnostic ignored "-Wvariadic-macros" + #elif defined(JSON_HEDLEY_GCC_VERSION) + #pragma GCC diagnostic ignored "-Wvariadic-macros" + #endif +#endif +#if defined(JSON_HEDLEY_NON_NULL) + #undef JSON_HEDLEY_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NON_NULL(...) __attribute__((__nonnull__(__VA_ARGS__))) +#else + #define JSON_HEDLEY_NON_NULL(...) +#endif +JSON_HEDLEY_DIAGNOSTIC_POP + +#if defined(JSON_HEDLEY_PRINTF_FORMAT) + #undef JSON_HEDLEY_PRINTF_FORMAT +#endif +#if defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && !defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(ms_printf, string_idx, first_to_check))) +#elif defined(__MINGW32__) && JSON_HEDLEY_GCC_HAS_ATTRIBUTE(format,4,4,0) && defined(__USE_MINGW_ANSI_STDIO) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(gnu_printf, string_idx, first_to_check))) +#elif \ + JSON_HEDLEY_HAS_ATTRIBUTE(format) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,6,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __attribute__((__format__(__printf__, string_idx, first_to_check))) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(6,0,0) + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) __declspec(vaformat(printf,string_idx,first_to_check)) +#else + #define JSON_HEDLEY_PRINTF_FORMAT(string_idx,first_to_check) +#endif + +#if defined(JSON_HEDLEY_CONSTEXPR) + #undef JSON_HEDLEY_CONSTEXPR +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_CONSTEXPR JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(constexpr) + #endif +#endif +#if !defined(JSON_HEDLEY_CONSTEXPR) + #define JSON_HEDLEY_CONSTEXPR +#endif + +#if defined(JSON_HEDLEY_PREDICT) + #undef JSON_HEDLEY_PREDICT +#endif +#if defined(JSON_HEDLEY_LIKELY) + #undef JSON_HEDLEY_LIKELY +#endif +#if defined(JSON_HEDLEY_UNLIKELY) + #undef JSON_HEDLEY_UNLIKELY +#endif +#if defined(JSON_HEDLEY_UNPREDICTABLE) + #undef JSON_HEDLEY_UNPREDICTABLE +#endif +#if JSON_HEDLEY_HAS_BUILTIN(__builtin_unpredictable) + #define JSON_HEDLEY_UNPREDICTABLE(expr) __builtin_unpredictable((expr)) +#endif +#if \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect_with_probability) && !defined(JSON_HEDLEY_PGI_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(9,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, value, probability) __builtin_expect_with_probability( (expr), (value), (probability)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) __builtin_expect_with_probability(!!(expr), 1 , (probability)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) __builtin_expect_with_probability(!!(expr), 0 , (probability)) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect (!!(expr), 1 ) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect (!!(expr), 0 ) +#elif \ + (JSON_HEDLEY_HAS_BUILTIN(__builtin_expect) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,15,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,7,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,27) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PREDICT(expr, expected, probability) \ + (((probability) >= 0.9) ? __builtin_expect((expr), (expected)) : (JSON_HEDLEY_STATIC_CAST(void, expected), (expr))) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 1) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 0) : !!(expr))); \ + })) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) \ + (__extension__ ({ \ + double hedley_probability_ = (probability); \ + ((hedley_probability_ >= 0.9) ? __builtin_expect(!!(expr), 0) : ((hedley_probability_ <= 0.1) ? __builtin_expect(!!(expr), 1) : !!(expr))); \ + })) +# define JSON_HEDLEY_LIKELY(expr) __builtin_expect(!!(expr), 1) +# define JSON_HEDLEY_UNLIKELY(expr) __builtin_expect(!!(expr), 0) +#else +# define JSON_HEDLEY_PREDICT(expr, expected, probability) (JSON_HEDLEY_STATIC_CAST(void, expected), (expr)) +# define JSON_HEDLEY_PREDICT_TRUE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_PREDICT_FALSE(expr, probability) (!!(expr)) +# define JSON_HEDLEY_LIKELY(expr) (!!(expr)) +# define JSON_HEDLEY_UNLIKELY(expr) (!!(expr)) +#endif +#if !defined(JSON_HEDLEY_UNPREDICTABLE) + #define JSON_HEDLEY_UNPREDICTABLE(expr) JSON_HEDLEY_PREDICT(expr, 1, 0.5) +#endif + +#if defined(JSON_HEDLEY_MALLOC) + #undef JSON_HEDLEY_MALLOC +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(malloc) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_MALLOC __attribute__((__malloc__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_MALLOC _Pragma("returns_new_memory") +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_MALLOC __declspec(restrict) +#else + #define JSON_HEDLEY_MALLOC +#endif + +#if defined(JSON_HEDLEY_PURE) + #undef JSON_HEDLEY_PURE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(pure) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,96,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PURE __attribute__((__pure__)) +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) +# define JSON_HEDLEY_PURE _Pragma("does_not_write_global_data") +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(2,0,1) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) \ + ) +# define JSON_HEDLEY_PURE _Pragma("FUNC_IS_PURE;") +#else +# define JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_CONST) + #undef JSON_HEDLEY_CONST +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(const) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(2,5,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_CONST __attribute__((__const__)) +#elif \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) + #define JSON_HEDLEY_CONST _Pragma("no_side_effect") +#else + #define JSON_HEDLEY_CONST JSON_HEDLEY_PURE +#endif + +#if defined(JSON_HEDLEY_RESTRICT) + #undef JSON_HEDLEY_RESTRICT +#endif +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT restrict +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(14,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(17,10,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,4) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,14,0) && defined(__cplusplus)) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) || \ + defined(__clang__) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RESTRICT __restrict +#elif JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,3,0) && !defined(__cplusplus) + #define JSON_HEDLEY_RESTRICT _Restrict +#else + #define JSON_HEDLEY_RESTRICT +#endif + +#if defined(JSON_HEDLEY_INLINE) + #undef JSON_HEDLEY_INLINE +#endif +#if \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) || \ + (defined(__cplusplus) && (__cplusplus >= 199711L)) + #define JSON_HEDLEY_INLINE inline +#elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(6,2,0) + #define JSON_HEDLEY_INLINE __inline__ +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,1,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(3,1,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,2,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(8,0,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_INLINE __inline +#else + #define JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_ALWAYS_INLINE) + #undef JSON_HEDLEY_ALWAYS_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(always_inline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) +# define JSON_HEDLEY_ALWAYS_INLINE __attribute__((__always_inline__)) JSON_HEDLEY_INLINE +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(12,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_ALWAYS_INLINE __forceinline +#elif defined(__cplusplus) && \ + ( \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) \ + ) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("FUNC_ALWAYS_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_ALWAYS_INLINE _Pragma("inline=forced") +#else +# define JSON_HEDLEY_ALWAYS_INLINE JSON_HEDLEY_INLINE +#endif + +#if defined(JSON_HEDLEY_NEVER_INLINE) + #undef JSON_HEDLEY_NEVER_INLINE +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(noinline) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(10,1,0) || \ + JSON_HEDLEY_TI_VERSION_CHECK(15,12,0) || \ + (JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(4,8,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_ARMCL_VERSION_CHECK(5,2,0) || \ + (JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL2000_VERSION_CHECK(6,4,0) || \ + (JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,0,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(4,3,0) || \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) || \ + JSON_HEDLEY_TI_CL7X_VERSION_CHECK(1,2,0) || \ + JSON_HEDLEY_TI_CLPRU_VERSION_CHECK(2,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) || \ + JSON_HEDLEY_IAR_VERSION_CHECK(8,10,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute__((__noinline__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,10,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#elif JSON_HEDLEY_PGI_VERSION_CHECK(10,2,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("noinline") +#elif JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,0,0) && defined(__cplusplus) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("FUNC_CANNOT_INLINE;") +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) + #define JSON_HEDLEY_NEVER_INLINE _Pragma("inline=never") +#elif JSON_HEDLEY_COMPCERT_VERSION_CHECK(3,2,0) + #define JSON_HEDLEY_NEVER_INLINE __attribute((noinline)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(9,0,0) + #define JSON_HEDLEY_NEVER_INLINE __declspec(noinline) +#else + #define JSON_HEDLEY_NEVER_INLINE +#endif + +#if defined(JSON_HEDLEY_PRIVATE) + #undef JSON_HEDLEY_PRIVATE +#endif +#if defined(JSON_HEDLEY_PUBLIC) + #undef JSON_HEDLEY_PUBLIC +#endif +#if defined(JSON_HEDLEY_IMPORT) + #undef JSON_HEDLEY_IMPORT +#endif +#if defined(_WIN32) || defined(__CYGWIN__) +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC __declspec(dllexport) +# define JSON_HEDLEY_IMPORT __declspec(dllimport) +#else +# if \ + JSON_HEDLEY_HAS_ATTRIBUTE(visibility) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,11,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + ( \ + defined(__TI_EABI__) && \ + ( \ + (JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,2,0) && defined(__TI_GNU_ATTRIBUTE_SUPPORT__)) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(7,5,0) \ + ) \ + ) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) +# define JSON_HEDLEY_PRIVATE __attribute__((__visibility__("hidden"))) +# define JSON_HEDLEY_PUBLIC __attribute__((__visibility__("default"))) +# else +# define JSON_HEDLEY_PRIVATE +# define JSON_HEDLEY_PUBLIC +# endif +# define JSON_HEDLEY_IMPORT extern +#endif + +#if defined(JSON_HEDLEY_NO_THROW) + #undef JSON_HEDLEY_NO_THROW +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(nothrow) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,3,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_NO_THROW __attribute__((__nothrow__)) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) + #define JSON_HEDLEY_NO_THROW __declspec(nothrow) +#else + #define JSON_HEDLEY_NO_THROW +#endif + +#if defined(JSON_HEDLEY_FALL_THROUGH) + #undef JSON_HEDLEY_FALL_THROUGH +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(fallthrough) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(7,0,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_FALL_THROUGH __attribute__((__fallthrough__)) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE_NS(clang,fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[clang::fallthrough]]) +#elif JSON_HEDLEY_HAS_CPP_ATTRIBUTE(fallthrough) + #define JSON_HEDLEY_FALL_THROUGH JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_([[fallthrough]]) +#elif defined(__fallthrough) /* SAL */ + #define JSON_HEDLEY_FALL_THROUGH __fallthrough +#else + #define JSON_HEDLEY_FALL_THROUGH +#endif + +#if defined(JSON_HEDLEY_RETURNS_NON_NULL) + #undef JSON_HEDLEY_RETURNS_NON_NULL +#endif +#if \ + JSON_HEDLEY_HAS_ATTRIBUTE(returns_nonnull) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_RETURNS_NON_NULL __attribute__((__returns_nonnull__)) +#elif defined(_Ret_notnull_) /* SAL */ + #define JSON_HEDLEY_RETURNS_NON_NULL _Ret_notnull_ +#else + #define JSON_HEDLEY_RETURNS_NON_NULL +#endif + +#if defined(JSON_HEDLEY_ARRAY_PARAM) + #undef JSON_HEDLEY_ARRAY_PARAM +#endif +#if \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) && \ + !defined(__STDC_NO_VLA__) && \ + !defined(__cplusplus) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_TINYC_VERSION) + #define JSON_HEDLEY_ARRAY_PARAM(name) (name) +#else + #define JSON_HEDLEY_ARRAY_PARAM(name) +#endif + +#if defined(JSON_HEDLEY_IS_CONSTANT) + #undef JSON_HEDLEY_IS_CONSTANT +#endif +#if defined(JSON_HEDLEY_REQUIRE_CONSTEXPR) + #undef JSON_HEDLEY_REQUIRE_CONSTEXPR +#endif +/* JSON_HEDLEY_IS_CONSTEXPR_ is for + HEDLEY INTERNAL USE ONLY. API subject to change without notice. */ +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #undef JSON_HEDLEY_IS_CONSTEXPR_ +#endif +#if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_constant_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,19) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(4,1,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_TI_CL6X_VERSION_CHECK(6,1,0) || \ + (JSON_HEDLEY_SUNPRO_VERSION_CHECK(5,10,0) && !defined(__cplusplus)) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_MCST_LCC_VERSION_CHECK(1,25,10) + #define JSON_HEDLEY_IS_CONSTANT(expr) __builtin_constant_p(expr) +#endif +#if !defined(__cplusplus) +# if \ + JSON_HEDLEY_HAS_BUILTIN(__builtin_types_compatible_p) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(3,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(13,1,0) || \ + JSON_HEDLEY_CRAY_VERSION_CHECK(8,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,4,0) || \ + JSON_HEDLEY_TINYC_VERSION_CHECK(0,9,24) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0)), int*) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) __builtin_types_compatible_p(__typeof__((1 ? (void*) ((intptr_t) ((expr) * 0)) : (int*) 0)), int*) +#endif +# elif \ + ( \ + defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && \ + !defined(JSON_HEDLEY_SUNPRO_VERSION) && \ + !defined(JSON_HEDLEY_PGI_VERSION) && \ + !defined(JSON_HEDLEY_IAR_VERSION)) || \ + (JSON_HEDLEY_HAS_EXTENSION(c_generic_selections) && !defined(JSON_HEDLEY_IAR_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,9,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(17,0,0) || \ + JSON_HEDLEY_IBM_VERSION_CHECK(12,1,0) || \ + JSON_HEDLEY_ARM_VERSION_CHECK(5,3,0) +#if defined(__INTPTR_TYPE__) + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((__INTPTR_TYPE__) ((expr) * 0)) : (int*) 0), int*: 1, void*: 0) +#else + #include + #define JSON_HEDLEY_IS_CONSTEXPR_(expr) _Generic((1 ? (void*) ((intptr_t) * 0) : (int*) 0), int*: 1, void*: 0) +#endif +# elif \ + defined(JSON_HEDLEY_GCC_VERSION) || \ + defined(JSON_HEDLEY_INTEL_VERSION) || \ + defined(JSON_HEDLEY_TINYC_VERSION) || \ + defined(JSON_HEDLEY_TI_ARMCL_VERSION) || \ + JSON_HEDLEY_TI_CL430_VERSION_CHECK(18,12,0) || \ + defined(JSON_HEDLEY_TI_CL2000_VERSION) || \ + defined(JSON_HEDLEY_TI_CL6X_VERSION) || \ + defined(JSON_HEDLEY_TI_CL7X_VERSION) || \ + defined(JSON_HEDLEY_TI_CLPRU_VERSION) || \ + defined(__clang__) +# define JSON_HEDLEY_IS_CONSTEXPR_(expr) ( \ + sizeof(void) != \ + sizeof(*( \ + 1 ? \ + ((void*) ((expr) * 0L) ) : \ +((struct { char v[sizeof(void) * 2]; } *) 1) \ + ) \ + ) \ + ) +# endif +#endif +#if defined(JSON_HEDLEY_IS_CONSTEXPR_) + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) JSON_HEDLEY_IS_CONSTEXPR_(expr) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (JSON_HEDLEY_IS_CONSTEXPR_(expr) ? (expr) : (-1)) +#else + #if !defined(JSON_HEDLEY_IS_CONSTANT) + #define JSON_HEDLEY_IS_CONSTANT(expr) (0) + #endif + #define JSON_HEDLEY_REQUIRE_CONSTEXPR(expr) (expr) +#endif + +#if defined(JSON_HEDLEY_BEGIN_C_DECLS) + #undef JSON_HEDLEY_BEGIN_C_DECLS +#endif +#if defined(JSON_HEDLEY_END_C_DECLS) + #undef JSON_HEDLEY_END_C_DECLS +#endif +#if defined(JSON_HEDLEY_C_DECL) + #undef JSON_HEDLEY_C_DECL +#endif +#if defined(__cplusplus) + #define JSON_HEDLEY_BEGIN_C_DECLS extern "C" { + #define JSON_HEDLEY_END_C_DECLS } + #define JSON_HEDLEY_C_DECL extern "C" +#else + #define JSON_HEDLEY_BEGIN_C_DECLS + #define JSON_HEDLEY_END_C_DECLS + #define JSON_HEDLEY_C_DECL +#endif + +#if defined(JSON_HEDLEY_STATIC_ASSERT) + #undef JSON_HEDLEY_STATIC_ASSERT +#endif +#if \ + !defined(__cplusplus) && ( \ + (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)) || \ + (JSON_HEDLEY_HAS_FEATURE(c_static_assert) && !defined(JSON_HEDLEY_INTEL_CL_VERSION)) || \ + JSON_HEDLEY_GCC_VERSION_CHECK(6,0,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) || \ + defined(_Static_assert) \ + ) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) _Static_assert(expr, message) +#elif \ + (defined(__cplusplus) && (__cplusplus >= 201103L)) || \ + JSON_HEDLEY_MSVC_VERSION_CHECK(16,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(static_assert(expr, message)) +#else +# define JSON_HEDLEY_STATIC_ASSERT(expr, message) +#endif + +#if defined(JSON_HEDLEY_NULL) + #undef JSON_HEDLEY_NULL +#endif +#if defined(__cplusplus) + #if __cplusplus >= 201103L + #define JSON_HEDLEY_NULL JSON_HEDLEY_DIAGNOSTIC_DISABLE_CPP98_COMPAT_WRAP_(nullptr) + #elif defined(NULL) + #define JSON_HEDLEY_NULL NULL + #else + #define JSON_HEDLEY_NULL JSON_HEDLEY_STATIC_CAST(void*, 0) + #endif +#elif defined(NULL) + #define JSON_HEDLEY_NULL NULL +#else + #define JSON_HEDLEY_NULL ((void*) 0) +#endif + +#if defined(JSON_HEDLEY_MESSAGE) + #undef JSON_HEDLEY_MESSAGE +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_MESSAGE(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(message msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message msg) +#elif JSON_HEDLEY_CRAY_VERSION_CHECK(5,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(_CRI message msg) +#elif JSON_HEDLEY_IAR_VERSION_CHECK(8,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#elif JSON_HEDLEY_PELLES_VERSION_CHECK(2,0,0) +# define JSON_HEDLEY_MESSAGE(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_WARNING) + #undef JSON_HEDLEY_WARNING +#endif +#if JSON_HEDLEY_HAS_WARNING("-Wunknown-pragmas") +# define JSON_HEDLEY_WARNING(msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + JSON_HEDLEY_DIAGNOSTIC_DISABLE_UNKNOWN_PRAGMAS \ + JSON_HEDLEY_PRAGMA(clang warning msg) \ + JSON_HEDLEY_DIAGNOSTIC_POP +#elif \ + JSON_HEDLEY_GCC_VERSION_CHECK(4,8,0) || \ + JSON_HEDLEY_PGI_VERSION_CHECK(18,4,0) || \ + JSON_HEDLEY_INTEL_VERSION_CHECK(13,0,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(GCC warning msg) +#elif \ + JSON_HEDLEY_MSVC_VERSION_CHECK(15,0,0) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_PRAGMA(message(msg)) +#else +# define JSON_HEDLEY_WARNING(msg) JSON_HEDLEY_MESSAGE(msg) +#endif + +#if defined(JSON_HEDLEY_REQUIRE) + #undef JSON_HEDLEY_REQUIRE +#endif +#if defined(JSON_HEDLEY_REQUIRE_MSG) + #undef JSON_HEDLEY_REQUIRE_MSG +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(diagnose_if) +# if JSON_HEDLEY_HAS_WARNING("-Wgcc-compat") +# define JSON_HEDLEY_REQUIRE(expr) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), #expr, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("clang diagnostic ignored \"-Wgcc-compat\"") \ + __attribute__((diagnose_if(!(expr), msg, "error"))) \ + JSON_HEDLEY_DIAGNOSTIC_POP +# else +# define JSON_HEDLEY_REQUIRE(expr) __attribute__((diagnose_if(!(expr), #expr, "error"))) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) __attribute__((diagnose_if(!(expr), msg, "error"))) +# endif +#else +# define JSON_HEDLEY_REQUIRE(expr) +# define JSON_HEDLEY_REQUIRE_MSG(expr,msg) +#endif + +#if defined(JSON_HEDLEY_FLAGS) + #undef JSON_HEDLEY_FLAGS +#endif +#if JSON_HEDLEY_HAS_ATTRIBUTE(flag_enum) && (!defined(__cplusplus) || JSON_HEDLEY_HAS_WARNING("-Wbitfield-enum-conversion")) + #define JSON_HEDLEY_FLAGS __attribute__((__flag_enum__)) +#else + #define JSON_HEDLEY_FLAGS +#endif + +#if defined(JSON_HEDLEY_FLAGS_CAST) + #undef JSON_HEDLEY_FLAGS_CAST +#endif +#if JSON_HEDLEY_INTEL_VERSION_CHECK(19,0,0) +# define JSON_HEDLEY_FLAGS_CAST(T, expr) (__extension__ ({ \ + JSON_HEDLEY_DIAGNOSTIC_PUSH \ + _Pragma("warning(disable:188)") \ + ((T) (expr)); \ + JSON_HEDLEY_DIAGNOSTIC_POP \ + })) +#else +# define JSON_HEDLEY_FLAGS_CAST(T, expr) JSON_HEDLEY_STATIC_CAST(T, expr) +#endif + +#if defined(JSON_HEDLEY_EMPTY_BASES) + #undef JSON_HEDLEY_EMPTY_BASES +#endif +#if \ + (JSON_HEDLEY_MSVC_VERSION_CHECK(19,0,23918) && !JSON_HEDLEY_MSVC_VERSION_CHECK(20,0,0)) || \ + JSON_HEDLEY_INTEL_CL_VERSION_CHECK(2021,1,0) + #define JSON_HEDLEY_EMPTY_BASES __declspec(empty_bases) +#else + #define JSON_HEDLEY_EMPTY_BASES +#endif + +/* Remaining macros are deprecated. */ + +#if defined(JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK) + #undef JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK +#endif +#if defined(__clang__) + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) (0) +#else + #define JSON_HEDLEY_GCC_NOT_CLANG_VERSION_CHECK(major,minor,patch) JSON_HEDLEY_GCC_VERSION_CHECK(major,minor,patch) +#endif + +#if defined(JSON_HEDLEY_CLANG_HAS_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_CPP_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_CPP_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_BUILTIN) + #undef JSON_HEDLEY_CLANG_HAS_BUILTIN +#endif +#define JSON_HEDLEY_CLANG_HAS_BUILTIN(builtin) JSON_HEDLEY_HAS_BUILTIN(builtin) + +#if defined(JSON_HEDLEY_CLANG_HAS_FEATURE) + #undef JSON_HEDLEY_CLANG_HAS_FEATURE +#endif +#define JSON_HEDLEY_CLANG_HAS_FEATURE(feature) JSON_HEDLEY_HAS_FEATURE(feature) + +#if defined(JSON_HEDLEY_CLANG_HAS_EXTENSION) + #undef JSON_HEDLEY_CLANG_HAS_EXTENSION +#endif +#define JSON_HEDLEY_CLANG_HAS_EXTENSION(extension) JSON_HEDLEY_HAS_EXTENSION(extension) + +#if defined(JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE) + #undef JSON_HEDLEY_CLANG_HAS_DECLSPEC_DECLSPEC_ATTRIBUTE +#endif +#define JSON_HEDLEY_CLANG_HAS_DECLSPEC_ATTRIBUTE(attribute) JSON_HEDLEY_HAS_DECLSPEC_ATTRIBUTE(attribute) + +#if defined(JSON_HEDLEY_CLANG_HAS_WARNING) + #undef JSON_HEDLEY_CLANG_HAS_WARNING +#endif +#define JSON_HEDLEY_CLANG_HAS_WARNING(warning) JSON_HEDLEY_HAS_WARNING(warning) + +#endif /* !defined(JSON_HEDLEY_VERSION) || (JSON_HEDLEY_VERSION < X) */ + + +// This file contains all internal macro definitions (except those affecting ABI) +// You MUST include macro_unscope.hpp at the end of json.hpp to undef all of them + +// #include + + +// exclude unsupported compilers +#if !defined(JSON_SKIP_UNSUPPORTED_COMPILER_CHECK) + #if defined(__clang__) + #if (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) < 30400 + #error "unsupported Clang version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #elif defined(__GNUC__) && !(defined(__ICC) || defined(__INTEL_COMPILER)) + #if (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40800 + #error "unsupported GCC version - see https://github.com/nlohmann/json#supported-compilers" + #endif + #endif +#endif + +// C++ language standard detection +// if the user manually specified the used c++ version this is skipped +#if !defined(JSON_HAS_CPP_23) && !defined(JSON_HAS_CPP_20) && !defined(JSON_HAS_CPP_17) && !defined(JSON_HAS_CPP_14) && !defined(JSON_HAS_CPP_11) + #if (defined(__cplusplus) && __cplusplus > 202002L) || (defined(_MSVC_LANG) && _MSVC_LANG > 202002L) + #define JSON_HAS_CPP_23 + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201703L) || (defined(_MSVC_LANG) && _MSVC_LANG > 201703L) + #define JSON_HAS_CPP_20 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201402L) || (defined(_HAS_CXX17) && _HAS_CXX17 == 1) // fix for issue #464 + #define JSON_HAS_CPP_17 + #define JSON_HAS_CPP_14 + #elif (defined(__cplusplus) && __cplusplus > 201103L) || (defined(_HAS_CXX14) && _HAS_CXX14 == 1) + #define JSON_HAS_CPP_14 + #endif + // the cpp 11 flag is always specified because it is the minimal required version + #define JSON_HAS_CPP_11 +#endif + +#ifdef __has_include + #if __has_include() + #include + #endif +#endif + +#if !defined(JSON_HAS_FILESYSTEM) && !defined(JSON_HAS_EXPERIMENTAL_FILESYSTEM) + #ifdef JSON_HAS_CPP_17 + #if defined(__cpp_lib_filesystem) + #define JSON_HAS_FILESYSTEM 1 + #elif defined(__cpp_lib_experimental_filesystem) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif !defined(__has_include) + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_FILESYSTEM 1 + #elif __has_include() + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 1 + #endif + + // std::filesystem does not work on MinGW GCC 8: https://sourceforge.net/p/mingw-w64/bugs/737/ + #if defined(__MINGW32__) && defined(__GNUC__) && __GNUC__ == 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before GCC 8: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 8 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before Clang 7: https://en.cppreference.com/w/cpp/compiler_support + #if defined(__clang_major__) && __clang_major__ < 7 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before MSVC 19.14: https://en.cppreference.com/w/cpp/compiler_support + #if defined(_MSC_VER) && _MSC_VER < 1914 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before iOS 13 + #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 130000 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + + // no filesystem support before macOS Catalina + #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101500 + #undef JSON_HAS_FILESYSTEM + #undef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #endif + #endif +#endif + +#ifndef JSON_HAS_EXPERIMENTAL_FILESYSTEM + #define JSON_HAS_EXPERIMENTAL_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_FILESYSTEM + #define JSON_HAS_FILESYSTEM 0 +#endif + +#ifndef JSON_HAS_THREE_WAY_COMPARISON + #if defined(__cpp_impl_three_way_comparison) && __cpp_impl_three_way_comparison >= 201907L \ + && defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907L + #define JSON_HAS_THREE_WAY_COMPARISON 1 + #else + #define JSON_HAS_THREE_WAY_COMPARISON 0 + #endif +#endif + +#ifndef JSON_HAS_RANGES + // ranges header shipping in GCC 11.1.0 (released 2021-04-27) has syntax error + #if defined(__GLIBCXX__) && __GLIBCXX__ == 20210427 + #define JSON_HAS_RANGES 0 + #elif defined(__cpp_lib_ranges) + #define JSON_HAS_RANGES 1 + #else + #define JSON_HAS_RANGES 0 + #endif +#endif + +#ifndef JSON_HAS_STATIC_RTTI + #if !defined(_HAS_STATIC_RTTI) || _HAS_STATIC_RTTI != 0 + #define JSON_HAS_STATIC_RTTI 1 + #else + #define JSON_HAS_STATIC_RTTI 0 + #endif +#endif + +#ifdef JSON_HAS_CPP_17 + #define JSON_INLINE_VARIABLE inline +#else + #define JSON_INLINE_VARIABLE +#endif + +#if JSON_HEDLEY_HAS_ATTRIBUTE(no_unique_address) + #define JSON_NO_UNIQUE_ADDRESS [[no_unique_address]] +#else + #define JSON_NO_UNIQUE_ADDRESS +#endif + +// disable documentation warnings on clang +#if defined(__clang__) + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdocumentation" + #pragma clang diagnostic ignored "-Wdocumentation-unknown-command" +#endif + +// allow disabling exceptions +#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(JSON_NOEXCEPTION) + #define JSON_THROW(exception) throw exception + #define JSON_TRY try + #define JSON_CATCH(exception) catch(exception) + #define JSON_INTERNAL_CATCH(exception) catch(exception) +#else + #include + #define JSON_THROW(exception) std::abort() + #define JSON_TRY if(true) + #define JSON_CATCH(exception) if(false) + #define JSON_INTERNAL_CATCH(exception) if(false) +#endif + +// override exception macros +#if defined(JSON_THROW_USER) + #undef JSON_THROW + #define JSON_THROW JSON_THROW_USER +#endif +#if defined(JSON_TRY_USER) + #undef JSON_TRY + #define JSON_TRY JSON_TRY_USER +#endif +#if defined(JSON_CATCH_USER) + #undef JSON_CATCH + #define JSON_CATCH JSON_CATCH_USER + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_CATCH_USER +#endif +#if defined(JSON_INTERNAL_CATCH_USER) + #undef JSON_INTERNAL_CATCH + #define JSON_INTERNAL_CATCH JSON_INTERNAL_CATCH_USER +#endif + +// allow overriding assert +#if !defined(JSON_ASSERT) + #include // assert + #define JSON_ASSERT(x) assert(x) +#endif + +// allow to access some private functions (needed by the test suite) +#if defined(JSON_TESTS_PRIVATE) + #define JSON_PRIVATE_UNLESS_TESTED public +#else + #define JSON_PRIVATE_UNLESS_TESTED private +#endif + +/*! +@brief macro to briefly define a mapping between an enum and JSON +@def NLOHMANN_JSON_SERIALIZE_ENUM +@since version 3.4.0 +*/ +#define NLOHMANN_JSON_SERIALIZE_ENUM(ENUM_TYPE, ...) \ + template \ + inline void to_json(BasicJsonType& j, const ENUM_TYPE& e) \ + { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [e](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.first == e; \ + }); \ + j = ((it != std::end(m)) ? it : std::begin(m))->second; \ + } \ + template \ + inline void from_json(const BasicJsonType& j, ENUM_TYPE& e) \ + { \ + /* NOLINTNEXTLINE(modernize-type-traits) we use C++11 */ \ + static_assert(std::is_enum::value, #ENUM_TYPE " must be an enum!"); \ + /* NOLINTNEXTLINE(modernize-avoid-c-arrays) we don't want to depend on */ \ + static const std::pair m[] = __VA_ARGS__; \ + auto it = std::find_if(std::begin(m), std::end(m), \ + [&j](const std::pair& ej_pair) -> bool \ + { \ + return ej_pair.second == j; \ + }); \ + e = ((it != std::end(m)) ? it : std::begin(m))->first; \ + } + +// Ugly macros to avoid uglier copy-paste when specializing basic_json. They +// may be removed in the future once the class is split. + +#define NLOHMANN_BASIC_JSON_TPL_DECLARATION \ + template class ObjectType, \ + template class ArrayType, \ + class StringType, class BooleanType, class NumberIntegerType, \ + class NumberUnsignedType, class NumberFloatType, \ + template class AllocatorType, \ + template class JSONSerializer, \ + class BinaryType, \ + class CustomBaseClass> + +#define NLOHMANN_BASIC_JSON_TPL \ + basic_json + +// Macros to simplify conversion from/to types + +#define NLOHMANN_JSON_EXPAND( x ) x +#define NLOHMANN_JSON_GET_MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, NAME,...) NAME +#define NLOHMANN_JSON_PASTE(...) NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_GET_MACRO(__VA_ARGS__, \ + NLOHMANN_JSON_PASTE64, \ + NLOHMANN_JSON_PASTE63, \ + NLOHMANN_JSON_PASTE62, \ + NLOHMANN_JSON_PASTE61, \ + NLOHMANN_JSON_PASTE60, \ + NLOHMANN_JSON_PASTE59, \ + NLOHMANN_JSON_PASTE58, \ + NLOHMANN_JSON_PASTE57, \ + NLOHMANN_JSON_PASTE56, \ + NLOHMANN_JSON_PASTE55, \ + NLOHMANN_JSON_PASTE54, \ + NLOHMANN_JSON_PASTE53, \ + NLOHMANN_JSON_PASTE52, \ + NLOHMANN_JSON_PASTE51, \ + NLOHMANN_JSON_PASTE50, \ + NLOHMANN_JSON_PASTE49, \ + NLOHMANN_JSON_PASTE48, \ + NLOHMANN_JSON_PASTE47, \ + NLOHMANN_JSON_PASTE46, \ + NLOHMANN_JSON_PASTE45, \ + NLOHMANN_JSON_PASTE44, \ + NLOHMANN_JSON_PASTE43, \ + NLOHMANN_JSON_PASTE42, \ + NLOHMANN_JSON_PASTE41, \ + NLOHMANN_JSON_PASTE40, \ + NLOHMANN_JSON_PASTE39, \ + NLOHMANN_JSON_PASTE38, \ + NLOHMANN_JSON_PASTE37, \ + NLOHMANN_JSON_PASTE36, \ + NLOHMANN_JSON_PASTE35, \ + NLOHMANN_JSON_PASTE34, \ + NLOHMANN_JSON_PASTE33, \ + NLOHMANN_JSON_PASTE32, \ + NLOHMANN_JSON_PASTE31, \ + NLOHMANN_JSON_PASTE30, \ + NLOHMANN_JSON_PASTE29, \ + NLOHMANN_JSON_PASTE28, \ + NLOHMANN_JSON_PASTE27, \ + NLOHMANN_JSON_PASTE26, \ + NLOHMANN_JSON_PASTE25, \ + NLOHMANN_JSON_PASTE24, \ + NLOHMANN_JSON_PASTE23, \ + NLOHMANN_JSON_PASTE22, \ + NLOHMANN_JSON_PASTE21, \ + NLOHMANN_JSON_PASTE20, \ + NLOHMANN_JSON_PASTE19, \ + NLOHMANN_JSON_PASTE18, \ + NLOHMANN_JSON_PASTE17, \ + NLOHMANN_JSON_PASTE16, \ + NLOHMANN_JSON_PASTE15, \ + NLOHMANN_JSON_PASTE14, \ + NLOHMANN_JSON_PASTE13, \ + NLOHMANN_JSON_PASTE12, \ + NLOHMANN_JSON_PASTE11, \ + NLOHMANN_JSON_PASTE10, \ + NLOHMANN_JSON_PASTE9, \ + NLOHMANN_JSON_PASTE8, \ + NLOHMANN_JSON_PASTE7, \ + NLOHMANN_JSON_PASTE6, \ + NLOHMANN_JSON_PASTE5, \ + NLOHMANN_JSON_PASTE4, \ + NLOHMANN_JSON_PASTE3, \ + NLOHMANN_JSON_PASTE2, \ + NLOHMANN_JSON_PASTE1)(__VA_ARGS__)) +#define NLOHMANN_JSON_PASTE2(func, v1) func(v1) +#define NLOHMANN_JSON_PASTE3(func, v1, v2) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE2(func, v2) +#define NLOHMANN_JSON_PASTE4(func, v1, v2, v3) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE3(func, v2, v3) +#define NLOHMANN_JSON_PASTE5(func, v1, v2, v3, v4) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE4(func, v2, v3, v4) +#define NLOHMANN_JSON_PASTE6(func, v1, v2, v3, v4, v5) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE5(func, v2, v3, v4, v5) +#define NLOHMANN_JSON_PASTE7(func, v1, v2, v3, v4, v5, v6) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE6(func, v2, v3, v4, v5, v6) +#define NLOHMANN_JSON_PASTE8(func, v1, v2, v3, v4, v5, v6, v7) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE7(func, v2, v3, v4, v5, v6, v7) +#define NLOHMANN_JSON_PASTE9(func, v1, v2, v3, v4, v5, v6, v7, v8) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE8(func, v2, v3, v4, v5, v6, v7, v8) +#define NLOHMANN_JSON_PASTE10(func, v1, v2, v3, v4, v5, v6, v7, v8, v9) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE9(func, v2, v3, v4, v5, v6, v7, v8, v9) +#define NLOHMANN_JSON_PASTE11(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE10(func, v2, v3, v4, v5, v6, v7, v8, v9, v10) +#define NLOHMANN_JSON_PASTE12(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE11(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) +#define NLOHMANN_JSON_PASTE13(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE12(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) +#define NLOHMANN_JSON_PASTE14(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE13(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) +#define NLOHMANN_JSON_PASTE15(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE14(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) +#define NLOHMANN_JSON_PASTE16(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE15(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15) +#define NLOHMANN_JSON_PASTE17(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE16(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16) +#define NLOHMANN_JSON_PASTE18(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE17(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17) +#define NLOHMANN_JSON_PASTE19(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE18(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18) +#define NLOHMANN_JSON_PASTE20(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE19(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19) +#define NLOHMANN_JSON_PASTE21(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE20(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20) +#define NLOHMANN_JSON_PASTE22(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE21(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21) +#define NLOHMANN_JSON_PASTE23(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE22(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22) +#define NLOHMANN_JSON_PASTE24(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE23(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23) +#define NLOHMANN_JSON_PASTE25(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE24(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24) +#define NLOHMANN_JSON_PASTE26(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE25(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25) +#define NLOHMANN_JSON_PASTE27(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE26(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26) +#define NLOHMANN_JSON_PASTE28(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE27(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27) +#define NLOHMANN_JSON_PASTE29(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE28(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28) +#define NLOHMANN_JSON_PASTE30(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE29(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29) +#define NLOHMANN_JSON_PASTE31(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE30(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30) +#define NLOHMANN_JSON_PASTE32(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE31(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31) +#define NLOHMANN_JSON_PASTE33(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE32(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32) +#define NLOHMANN_JSON_PASTE34(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE33(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33) +#define NLOHMANN_JSON_PASTE35(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE34(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34) +#define NLOHMANN_JSON_PASTE36(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE35(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35) +#define NLOHMANN_JSON_PASTE37(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE36(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36) +#define NLOHMANN_JSON_PASTE38(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE37(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37) +#define NLOHMANN_JSON_PASTE39(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE38(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38) +#define NLOHMANN_JSON_PASTE40(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE39(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39) +#define NLOHMANN_JSON_PASTE41(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE40(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40) +#define NLOHMANN_JSON_PASTE42(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE41(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41) +#define NLOHMANN_JSON_PASTE43(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE42(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42) +#define NLOHMANN_JSON_PASTE44(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE43(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43) +#define NLOHMANN_JSON_PASTE45(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE44(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44) +#define NLOHMANN_JSON_PASTE46(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE45(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45) +#define NLOHMANN_JSON_PASTE47(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE46(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46) +#define NLOHMANN_JSON_PASTE48(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE47(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47) +#define NLOHMANN_JSON_PASTE49(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE48(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48) +#define NLOHMANN_JSON_PASTE50(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE49(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49) +#define NLOHMANN_JSON_PASTE51(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE50(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50) +#define NLOHMANN_JSON_PASTE52(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE51(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51) +#define NLOHMANN_JSON_PASTE53(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE52(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52) +#define NLOHMANN_JSON_PASTE54(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE53(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53) +#define NLOHMANN_JSON_PASTE55(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE54(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54) +#define NLOHMANN_JSON_PASTE56(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE55(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55) +#define NLOHMANN_JSON_PASTE57(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE56(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56) +#define NLOHMANN_JSON_PASTE58(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE57(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57) +#define NLOHMANN_JSON_PASTE59(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE58(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58) +#define NLOHMANN_JSON_PASTE60(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE59(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59) +#define NLOHMANN_JSON_PASTE61(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE60(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60) +#define NLOHMANN_JSON_PASTE62(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE61(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61) +#define NLOHMANN_JSON_PASTE63(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE62(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62) +#define NLOHMANN_JSON_PASTE64(func, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) NLOHMANN_JSON_PASTE2(func, v1) NLOHMANN_JSON_PASTE63(func, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35, v36, v37, v38, v39, v40, v41, v42, v43, v44, v45, v46, v47, v48, v49, v50, v51, v52, v53, v54, v55, v56, v57, v58, v59, v60, v61, v62, v63) + +#define NLOHMANN_JSON_TO(v1) nlohmann_json_j[#v1] = nlohmann_json_t.v1; +#define NLOHMANN_JSON_FROM(v1) nlohmann_json_j.at(#v1).get_to(nlohmann_json_t.v1); +#define NLOHMANN_JSON_FROM_WITH_DEFAULT(v1) nlohmann_json_t.v1 = !nlohmann_json_j.is_null() ? nlohmann_json_j.value(#v1, nlohmann_json_default_obj.v1) : nlohmann_json_default_obj.v1; + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE +@since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE +@since version 3.9.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.11.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.11.3 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_type_non_intrusive/ +*/ +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + friend void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + friend void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_WITH_DEFAULT(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } \ + template::value, int> = 0> \ + void from_json(const BasicJsonType& nlohmann_json_j, Type& nlohmann_json_t) { nlohmann::from_json(nlohmann_json_j, static_cast(nlohmann_json_t)); const Type nlohmann_json_default_obj{}; NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM_WITH_DEFAULT, __VA_ARGS__)) } + +/*! +@brief macro +@def NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE +@since version 3.12.0 +@sa https://json.nlohmann.me/api/macros/nlohmann_define_derived_type/ +*/ +#define NLOHMANN_DEFINE_DERIVED_TYPE_NON_INTRUSIVE_ONLY_SERIALIZE(Type, BaseType, ...) \ + template::value, int> = 0> \ + void to_json(BasicJsonType& nlohmann_json_j, const Type& nlohmann_json_t) { nlohmann::to_json(nlohmann_json_j, static_cast(nlohmann_json_t)); NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } + +// inspired from https://stackoverflow.com/a/26745591 +// allows calling any std function as if (e.g., with begin): +// using std::begin; begin(x); +// +// it allows using the detected idiom to retrieve the return type +// of such an expression +#define NLOHMANN_CAN_CALL_STD_FUNC_IMPL(std_name) \ + namespace detail { \ + using std::std_name; \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + } \ + \ + namespace detail2 { \ + struct std_name##_tag \ + { \ + }; \ + \ + template \ + std_name##_tag std_name(T&&...); \ + \ + template \ + using result_of_##std_name = decltype(std_name(std::declval()...)); \ + \ + template \ + struct would_call_std_##std_name \ + { \ + static constexpr auto const value = ::nlohmann::detail:: \ + is_detected_exact::value; \ + }; \ + } /* namespace detail2 */ \ + \ + template \ + struct would_call_std_##std_name : detail2::would_call_std_##std_name \ + { \ + } + +#ifndef JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_USE_IMPLICIT_CONVERSIONS 1 +#endif + +#if JSON_USE_IMPLICIT_CONVERSIONS + #define JSON_EXPLICIT +#else + #define JSON_EXPLICIT explicit +#endif + +#ifndef JSON_DISABLE_ENUM_SERIALIZATION + #define JSON_DISABLE_ENUM_SERIALIZATION 0 +#endif + +#ifndef JSON_USE_GLOBAL_UDLS + #define JSON_USE_GLOBAL_UDLS 1 +#endif + +#if JSON_HAS_THREE_WAY_COMPARISON + #include // partial_ordering +#endif + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/////////////////////////// +// JSON type enumeration // +/////////////////////////// + +/*! +@brief the JSON type enumeration + +This enumeration collects the different JSON types. It is internally used to +distinguish the stored values, and the functions @ref basic_json::is_null(), +@ref basic_json::is_object(), @ref basic_json::is_array(), +@ref basic_json::is_string(), @ref basic_json::is_boolean(), +@ref basic_json::is_number() (with @ref basic_json::is_number_integer(), +@ref basic_json::is_number_unsigned(), and @ref basic_json::is_number_float()), +@ref basic_json::is_discarded(), @ref basic_json::is_primitive(), and +@ref basic_json::is_structured() rely on it. + +@note There are three enumeration entries (number_integer, number_unsigned, and +number_float), because the library distinguishes these three types for numbers: +@ref basic_json::number_unsigned_t is used for unsigned integers, +@ref basic_json::number_integer_t is used for signed integers, and +@ref basic_json::number_float_t is used for floating-point numbers or to +approximate integers which do not fit in the limits of their respective type. + +@sa see @ref basic_json::basic_json(const value_t value_type) -- create a JSON +value with the default value for a given type + +@since version 1.0.0 +*/ +enum class value_t : std::uint8_t +{ + null, ///< null value + object, ///< object (unordered set of name/value pairs) + array, ///< array (ordered collection of values) + string, ///< string value + boolean, ///< boolean value + number_integer, ///< number value (signed integer) + number_unsigned, ///< number value (unsigned integer) + number_float, ///< number value (floating-point) + binary, ///< binary array (ordered collection of bytes) + discarded ///< discarded by the parser callback function +}; + +/*! +@brief comparison operator for JSON types + +Returns an ordering that is similar to Python: +- order: null < boolean < number < object < array < string < binary +- furthermore, each type is not smaller than itself +- discarded values are not comparable +- binary is represented as a b"" string in python and directly comparable to a + string; however, making a binary array directly comparable with a string would + be surprising behavior in a JSON file. + +@since version 1.0.0 +*/ +#if JSON_HAS_THREE_WAY_COMPARISON + inline std::partial_ordering operator<=>(const value_t lhs, const value_t rhs) noexcept // *NOPAD* +#else + inline bool operator<(const value_t lhs, const value_t rhs) noexcept +#endif +{ + static constexpr std::array order = {{ + 0 /* null */, 3 /* object */, 4 /* array */, 5 /* string */, + 1 /* boolean */, 2 /* integer */, 2 /* unsigned */, 2 /* float */, + 6 /* binary */ + } + }; + + const auto l_index = static_cast(lhs); + const auto r_index = static_cast(rhs); +#if JSON_HAS_THREE_WAY_COMPARISON + if (l_index < order.size() && r_index < order.size()) + { + return order[l_index] <=> order[r_index]; // *NOPAD* + } + return std::partial_ordering::unordered; +#else + return l_index < order.size() && r_index < order.size() && order[l_index] < order[r_index]; +#endif +} + +// GCC selects the built-in operator< over an operator rewritten from +// a user-defined spaceship operator +// Clang, MSVC, and ICC select the rewritten candidate +// (see GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200) +#if JSON_HAS_THREE_WAY_COMPARISON && defined(__GNUC__) +inline bool operator<(const value_t lhs, const value_t rhs) noexcept +{ + return std::is_lt(lhs <=> rhs); // *NOPAD* +} +#endif + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/*! +@brief replace all occurrences of a substring by another string + +@param[in,out] s the string to manipulate; changed so that all + occurrences of @a f are replaced with @a t +@param[in] f the substring to replace with @a t +@param[in] t the string to replace @a f + +@pre The search string @a f must not be empty. **This precondition is +enforced with an assertion.** + +@since version 2.0.0 +*/ +template +inline void replace_substring(StringType& s, const StringType& f, + const StringType& t) +{ + JSON_ASSERT(!f.empty()); + for (auto pos = s.find(f); // find first occurrence of f + pos != StringType::npos; // make sure f was found + s.replace(pos, f.size(), t), // replace with t, and + pos = s.find(f, pos + t.size())) // find next occurrence of f + {} +} + +/*! + * @brief string escaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to escape + * @return escaped string + * + * Note the order of escaping "~" to "~0" and "/" to "~1" is important. + */ +template +inline StringType escape(StringType s) +{ + replace_substring(s, StringType{"~"}, StringType{"~0"}); + replace_substring(s, StringType{"/"}, StringType{"~1"}); + return s; +} + +/*! + * @brief string unescaping as described in RFC 6901 (Sect. 4) + * @param[in] s string to unescape + * @return unescaped string + * + * Note the order of escaping "~1" to "/" and "~0" to "~" is important. + */ +template +static void unescape(StringType& s) +{ + replace_substring(s, StringType{"~1"}, StringType{"/"}); + replace_substring(s, StringType{"~0"}, StringType{"~"}); +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // size_t + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +/// struct to capture the start position of the current token +struct position_t +{ + /// the total number of characters read + std::size_t chars_read_total = 0; + /// the number of characters read in the current line + std::size_t chars_read_current_line = 0; + /// the number of lines read + std::size_t lines_read = 0; + + /// conversion to size_t to preserve SAX interface + constexpr operator size_t() const + { + return chars_read_total; + } +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-FileCopyrightText: 2018 The Abseil Authors +// SPDX-License-Identifier: MIT + + + +#include // array +#include // size_t +#include // conditional, enable_if, false_type, integral_constant, is_constructible, is_integral, is_same, remove_cv, remove_reference, true_type +#include // index_sequence, make_index_sequence, index_sequence_for + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +using uncvref_t = typename std::remove_cv::type>::type; + +#ifdef JSON_HAS_CPP_14 + +// the following utilities are natively available in C++14 +using std::enable_if_t; +using std::index_sequence; +using std::make_index_sequence; +using std::index_sequence_for; + +#else + +// alias templates to reduce boilerplate +template +using enable_if_t = typename std::enable_if::type; + +// The following code is taken from https://github.com/abseil/abseil-cpp/blob/10cb35e459f5ecca5b2ff107635da0bfa41011b4/absl/utility/utility.h +// which is part of Google Abseil (https://github.com/abseil/abseil-cpp), licensed under the Apache License 2.0. + +//// START OF CODE FROM GOOGLE ABSEIL + +// integer_sequence +// +// Class template representing a compile-time integer sequence. An instantiation +// of `integer_sequence` has a sequence of integers encoded in its +// type through its template arguments (which is a common need when +// working with C++11 variadic templates). `absl::integer_sequence` is designed +// to be a drop-in replacement for C++14's `std::integer_sequence`. +// +// Example: +// +// template< class T, T... Ints > +// void user_function(integer_sequence); +// +// int main() +// { +// // user_function's `T` will be deduced to `int` and `Ints...` +// // will be deduced to `0, 1, 2, 3, 4`. +// user_function(make_integer_sequence()); +// } +template +struct integer_sequence +{ + using value_type = T; + static constexpr std::size_t size() noexcept + { + return sizeof...(Ints); + } +}; + +// index_sequence +// +// A helper template for an `integer_sequence` of `size_t`, +// `absl::index_sequence` is designed to be a drop-in replacement for C++14's +// `std::index_sequence`. +template +using index_sequence = integer_sequence; + +namespace utility_internal +{ + +template +struct Extend; + +// Note that SeqSize == sizeof...(Ints). It's passed explicitly for efficiency. +template +struct Extend, SeqSize, 0> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)... >; +}; + +template +struct Extend, SeqSize, 1> +{ + using type = integer_sequence < T, Ints..., (Ints + SeqSize)..., 2 * SeqSize >; +}; + +// Recursion helper for 'make_integer_sequence'. +// 'Gen::type' is an alias for 'integer_sequence'. +template +struct Gen +{ + using type = + typename Extend < typename Gen < T, N / 2 >::type, N / 2, N % 2 >::type; +}; + +template +struct Gen +{ + using type = integer_sequence; +}; + +} // namespace utility_internal + +// Compile-time sequences of integers + +// make_integer_sequence +// +// This template alias is equivalent to +// `integer_sequence`, and is designed to be a drop-in +// replacement for C++14's `std::make_integer_sequence`. +template +using make_integer_sequence = typename utility_internal::Gen::type; + +// make_index_sequence +// +// This template alias is equivalent to `index_sequence<0, 1, ..., N-1>`, +// and is designed to be a drop-in replacement for C++14's +// `std::make_index_sequence`. +template +using make_index_sequence = make_integer_sequence; + +// index_sequence_for +// +// Converts a typename pack into an index sequence of the same length, and +// is designed to be a drop-in replacement for C++14's +// `std::index_sequence_for()` +template +using index_sequence_for = make_index_sequence; + +//// END OF CODE FROM GOOGLE ABSEIL + +#endif + +// dispatch utility (taken from ranges-v3) +template struct priority_tag : priority_tag < N - 1 > {}; +template<> struct priority_tag<0> {}; + +// taken from ranges-v3 +template +struct static_const +{ + static JSON_INLINE_VARIABLE constexpr T value{}; +}; + +#ifndef JSON_HAS_CPP_17 + template + constexpr T static_const::value; +#endif + +template +constexpr std::array make_array(Args&& ... args) +{ + return std::array {{static_cast(std::forward(args))...}}; +} + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // numeric_limits +#include // char_traits +#include // tuple +#include // false_type, is_constructible, is_integral, is_same, true_type +#include // declval + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +#include // random_access_iterator_tag + +// #include + +// #include + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN +namespace detail +{ + +template +struct iterator_types {}; + +template +struct iterator_types < + It, + void_t> +{ + using difference_type = typename It::difference_type; + using value_type = typename It::value_type; + using pointer = typename It::pointer; + using reference = typename It::reference; + using iterator_category = typename It::iterator_category; +}; + +// This is required as some compilers implement std::iterator_traits in a way that +// doesn't work with SFINAE. See https://github.com/nlohmann/json/issues/1341. +template +struct iterator_traits +{ +}; + +template +struct iterator_traits < T, enable_if_t < !std::is_pointer::value >> + : iterator_types +{ +}; + +template +struct iterator_traits::value>> +{ + using iterator_category = std::random_access_iterator_tag; + using value_type = T; + using difference_type = ptrdiff_t; + using pointer = T*; + using reference = T&; +}; + +} // namespace detail +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(begin); + +NLOHMANN_JSON_NAMESPACE_END + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + + + +// #include + + +NLOHMANN_JSON_NAMESPACE_BEGIN + +NLOHMANN_CAN_CALL_STD_FUNC_IMPL(end); + +NLOHMANN_JSON_NAMESPACE_END + +// #include + +// #include + +// #include +// __ _____ _____ _____ +// __| | __| | | | JSON for Modern C++ +// | | |__ | | | | | | version 3.12.0 +// |_____|_____|_____|_|___| https://github.com/nlohmann/json +// +// SPDX-FileCopyrightText: 2013 - 2025 Niels Lohmann +// SPDX-License-Identifier: MIT + +#ifndef INCLUDE_NLOHMANN_JSON_FWD_HPP_ + #define INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + #include // int64_t, uint64_t + #include // map + #include // allocator + #include // string + #include // vector + + // #include + + + /*! + @brief namespace for Niels Lohmann + @see https://github.com/nlohmann + @since version 1.0.0 + */ + NLOHMANN_JSON_NAMESPACE_BEGIN + + /*! + @brief default JSONSerializer template argument + + This serializer ignores the template arguments and uses ADL + ([argument-dependent lookup](https://en.cppreference.com/w/cpp/language/adl)) + for serialization. + */ + template + struct adl_serializer; + + /// a class to store JSON values + /// @sa https://json.nlohmann.me/api/basic_json/ + template class ObjectType = + std::map, + template class ArrayType = std::vector, + class StringType = std::string, class BooleanType = bool, + class NumberIntegerType = std::int64_t, + class NumberUnsignedType = std::uint64_t, + class NumberFloatType = double, + template class AllocatorType = std::allocator, + template class JSONSerializer = + adl_serializer, + class BinaryType = std::vector, // cppcheck-suppress syntaxError + class CustomBaseClass = void> + class basic_json; + + /// @brief JSON Pointer defines a string syntax for identifying a specific value within a JSON document + /// @sa https://json.nlohmann.me/api/json_pointer/ + template + class json_pointer; + + /*! + @brief default specialization + @sa https://json.nlohmann.me/api/json/ + */ + using json = basic_json<>; + + /// @brief a minimal map-like container that preserves insertion order + /// @sa https://json.nlohmann.me/api/ordered_map/ + template + struct ordered_map; + + /// @brief specialization that maintains the insertion order of object keys + /// @sa https://json.nlohmann.me/api/ordered_json/ + using ordered_json = basic_json; + + NLOHMANN_JSON_NAMESPACE_END + +#endif // INCLUDE_NLOHMANN_JSON_FWD_HPP_ + + +NLOHMANN_JSON_NAMESPACE_BEGIN +/*! +@brief detail namespace with internal helper functions + +This namespace collects functions that should not be exposed, +implementations of some @ref basic_json methods, and meta-programming helpers. + +@since version 2.1.0 +*/ +namespace detail +{ + +///////////// +// helpers // +///////////// + +// Note to maintainers: +// +// Every trait in this file expects a non CV-qualified type. +// The only exceptions are in the 'aliases for detected' section +// (i.e. those of the form: decltype(T::member_function(std::declval()))) +// +// In this case, T has to be properly CV-qualified to constraint the function arguments +// (e.g. to_json(BasicJsonType&, const T&)) + +template struct is_basic_json : std::false_type {}; + +NLOHMANN_BASIC_JSON_TPL_DECLARATION +struct is_basic_json : std::true_type {}; + +// used by exceptions create() member functions +// true_type for pointer to possibly cv-qualified basic_json or std::nullptr_t +// false_type otherwise +template +struct is_basic_json_context : + std::integral_constant < bool, + is_basic_json::type>::type>::value + || std::is_same::value > +{}; + +////////////////////// +// json_ref helpers // +////////////////////// + +template +class json_ref; + +template +struct is_json_ref : std::false_type {}; + +template +struct is_json_ref> : std::true_type {}; + +////////////////////////// +// aliases for detected // +////////////////////////// + +template +using mapped_type_t = typename T::mapped_type; + +template +using key_type_t = typename T::key_type; + +template +using value_type_t = typename T::value_type; + +template +using difference_type_t = typename T::difference_type; + +template +using pointer_t = typename T::pointer; + +template +using reference_t = typename T::reference; + +template +using iterator_category_t = typename T::iterator_category; + +template +using to_json_function = decltype(T::to_json(std::declval()...)); + +template +using from_json_function = decltype(T::from_json(std::declval()...)); + +template +using get_template_function = decltype(std::declval().template get()); + +// trait checking if JSONSerializer::from_json(json const&, udt&) exists +template +struct has_from_json : std::false_type {}; + +// trait checking if j.get is valid +// use this trait instead of std::is_constructible or std::is_convertible, +// both rely on, or make use of implicit conversions, and thus fail when T +// has several constructors/operator= (see https://github.com/nlohmann/json/issues/958) +template +struct is_getable +{ + static constexpr bool value = is_detected::value; +}; + +template +struct has_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if JSONSerializer::from_json(json const&) exists +// this overload is used for non-default-constructible user-defined-types +template +struct has_non_default_from_json : std::false_type {}; + +template +struct has_non_default_from_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +// This trait checks if BasicJsonType::json_serializer::to_json exists +// Do not evaluate the trait when T is a basic_json type, to avoid template instantiation infinite recursion. +template +struct has_to_json : std::false_type {}; + +template +struct has_to_json < BasicJsonType, T, enable_if_t < !is_basic_json::value >> +{ + using serializer = typename BasicJsonType::template json_serializer; + + static constexpr bool value = + is_detected_exact::value; +}; + +template +using detect_key_compare = typename T::key_compare; + +template +struct has_key_compare : std::integral_constant::value> {}; + +// obtains the actual object key comparator +template +struct actual_object_comparator +{ + using object_t = typename BasicJsonType::object_t; + using object_comparator_t = typename BasicJsonType::default_object_comparator_t; + using type = typename std::conditional < has_key_compare::value, + typename object_t::key_compare, object_comparator_t>::type; +}; + +template +using actual_object_comparator_t = typename actual_object_comparator::type; + +///////////////// +// char_traits // +///////////////// + +// Primary template of char_traits calls std char_traits +template +struct char_traits : std::char_traits +{}; + +// Explicitly define char traits for unsigned char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = unsigned char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +// Explicitly define char traits for signed char since it is not standard +template<> +struct char_traits : std::char_traits +{ + using char_type = signed char; + using int_type = uint64_t; + + // Redefine to_int_type function + static int_type to_int_type(char_type c) noexcept + { + return static_cast(c); + } + + static char_type to_char_type(int_type i) noexcept + { + return static_cast(i); + } + + static constexpr int_type eof() noexcept + { + return static_cast(std::char_traits::eof()); + } +}; + +/////////////////// +// is_ functions // +/////////////////// + +// https://en.cppreference.com/w/cpp/types/conjunction +template struct conjunction : std::true_type { }; +template struct conjunction : B { }; +template +struct conjunction +: std::conditional(B::value), conjunction, B>::type {}; + +// https://en.cppreference.com/w/cpp/types/negation +template struct negation : std::integral_constant < bool, !B::value > { }; + +// Reimplementation of is_constructible and is_default_constructible, due to them being broken for +// std::pair and std::tuple until LWG 2367 fix (see https://cplusplus.github.io/LWG/lwg-defects.html#2367). +// This causes compile errors in e.g. clang 3.5 or gcc 4.9. +template +struct is_default_constructible : std::is_default_constructible {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction, is_default_constructible> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_default_constructible> + : conjunction...> {}; + +template +struct is_constructible : std::is_constructible {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_constructible> : is_default_constructible> {}; + +template +struct is_iterator_traits : std::false_type {}; + +template +struct is_iterator_traits> +{ + private: + using traits = iterator_traits; + + public: + static constexpr auto value = + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value && + is_detected::value; +}; + +template +struct is_range +{ + private: + using t_ref = typename std::add_lvalue_reference::type; + + using iterator = detected_t; + using sentinel = detected_t; + + // to be 100% correct, it should use https://en.cppreference.com/w/cpp/iterator/input_or_output_iterator + // and https://en.cppreference.com/w/cpp/iterator/sentinel_for + // but reimplementing these would be too much work, as a lot of other concepts are used underneath + static constexpr auto is_iterator_begin = + is_iterator_traits>::value; + + public: + static constexpr bool value = !std::is_same::value && !std::is_same::value && is_iterator_begin; +}; + +template +using iterator_t = enable_if_t::value, result_of_begin())>>; + +template +using range_value_t = value_type_t>>; + +// The following implementation of is_complete_type is taken from +// https://blogs.msdn.microsoft.com/vcblog/2015/12/02/partial-support-for-expression-sfinae-in-vs-2015-update-1/ +// and is written by Xiang Fan who agreed to using it in this library. + +template +struct is_complete_type : std::false_type {}; + +template +struct is_complete_type : std::true_type {}; + +template +struct is_compatible_object_type_impl : std::false_type {}; + +template +struct is_compatible_object_type_impl < + BasicJsonType, CompatibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + // macOS's is_constructible does not play well with nonesuch... + static constexpr bool value = + is_constructible::value && + is_constructible::value; +}; + +template +struct is_compatible_object_type + : is_compatible_object_type_impl {}; + +template +struct is_constructible_object_type_impl : std::false_type {}; + +template +struct is_constructible_object_type_impl < + BasicJsonType, ConstructibleObjectType, + enable_if_t < is_detected::value&& + is_detected::value >> +{ + using object_t = typename BasicJsonType::object_t; + + static constexpr bool value = + (is_default_constructible::value && + (std::is_move_assignable::value || + std::is_copy_assignable::value) && + (is_constructible::value && + std::is_same < + typename object_t::mapped_type, + typename ConstructibleObjectType::mapped_type >::value)) || + (has_from_json::value || + has_non_default_from_json < + BasicJsonType, + typename ConstructibleObjectType::mapped_type >::value); +}; + +template +struct is_constructible_object_type + : is_constructible_object_type_impl {}; + +template +struct is_compatible_string_type +{ + static constexpr auto value = + is_constructible::value; +}; + +template +struct is_constructible_string_type +{ + // launder type through decltype() to fix compilation failure on ICPC +#ifdef __INTEL_COMPILER + using laundered_type = decltype(std::declval()); +#else + using laundered_type = ConstructibleStringType; +#endif + + static constexpr auto value = + conjunction < + is_constructible, + is_detected_exact>::value; +}; + +template +struct is_compatible_array_type_impl : std::false_type {}; + +template +struct is_compatible_array_type_impl < + BasicJsonType, CompatibleArrayType, + enable_if_t < + is_detected::value&& + is_iterator_traits>>::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 + !std::is_same>::value >> +{ + static constexpr bool value = + is_constructible>::value; +}; + +template +struct is_compatible_array_type + : is_compatible_array_type_impl {}; + +template +struct is_constructible_array_type_impl : std::false_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t::value >> + : std::true_type {}; + +template +struct is_constructible_array_type_impl < + BasicJsonType, ConstructibleArrayType, + enable_if_t < !std::is_same::value&& + !is_compatible_string_type::value&& + is_default_constructible::value&& +(std::is_move_assignable::value || + std::is_copy_assignable::value)&& +is_detected::value&& +is_iterator_traits>>::value&& +is_detected::value&& +// special case for types like std::filesystem::path whose iterator's value_type are themselves +// c.f. https://github.com/nlohmann/json/pull/3073 +!std::is_same>::value&& +is_complete_type < +detected_t>::value >> +{ + using value_type = range_value_t; + + static constexpr bool value = + std::is_same::value || + has_from_json::value || + has_non_default_from_json < + BasicJsonType, + value_type >::value; +}; + +template +struct is_constructible_array_type + : is_constructible_array_type_impl {}; + +template +struct is_compatible_integer_type_impl : std::false_type {}; + +template +struct is_compatible_integer_type_impl < + RealIntegerType, CompatibleNumberIntegerType, + enable_if_t < std::is_integral::value&& + std::is_integral::value&& + !std::is_same::value >> +{ + // is there an assert somewhere on overflows? + using RealLimits = std::numeric_limits; + using CompatibleLimits = std::numeric_limits; + + static constexpr auto value = + is_constructible::value && + CompatibleLimits::is_integer && + RealLimits::is_signed == CompatibleLimits::is_signed; +}; + +template +struct is_compatible_integer_type + : is_compatible_integer_type_impl {}; + +template +struct is_compatible_type_impl: std::false_type {}; + +template +struct is_compatible_type_impl < + BasicJsonType, CompatibleType, + enable_if_t::value >> +{ + static constexpr bool value = + has_to_json::value; +}; + +template +struct is_compatible_type + : is_compatible_type_impl {}; + +template +struct is_constructible_tuple : std::false_type {}; + +template +struct is_constructible_tuple> : conjunction...> {}; + +template +struct is_json_iterator_of : std::false_type {}; + +template +struct is_json_iterator_of : std::true_type {}; + +template +struct is_json_iterator_of : std::true_type +{}; + +// checks if a given type T is a template specialization of Primary +template