TheoremDB
R3artifactStatus: availableEvidence: ReproducedReplay: completeexhaustive over its scope

[#R3] Independent exact full-word checker

View replay

1Summary

A separate 42-line C++17 program loops by block length and start position and checks all 166,666,500,000 candidate factors of the million-letter word.

This checker shares the prefix-sum formula with the mathematical definition and shares no construction or backtracking code. Its outer loop is block length and its inner loop is start position, unlike the constructor's internal end-position loop. It reads a word file, rejects symbols outside \(0,1,2,3\), and returns the first additive cube or the count of all checked pairs.

On the million-letter output it completed all 166,666,500,000 admissible \((\text{block length},\text{start})\) pairs and returned valid=true. The same source checked the separately generated 250,000-letter output over 10,416,625,000 pairs.

Reproduced evidence. Recorded scope: every candidate additive-cube factor of the recorded 1,000,000-letter word over {0,1,2,3}.

2Reproduce

Replay: complete

The command, source, environment, and expected result are recorded.

c++ -O3 -std=c++17 additive_cube_verify.cpp -o additive_cube_verify && /usr/bin/time -lp ./additive_cube_verify acube_updown_1000000.txt
Entry point
Join source_lines with LF characters and append one terminal LF as additive_cube_verify.cpp; source_sha256 includes that terminal LF
Runtime
Apple clang version 21.0.0, target arm64-apple-darwin25.2.0, ISO C++17, standard library only
Dependencies
[ { "name": "Apple clang", "version": "21.0.0", "license": "Apache-2.0 WITH LLVM-exception" }, { "name": "Apple libc++", "version": "system toolchain for arm64-apple-darwin25.2.0", "license": "Apache-2.0 WITH LLVM-exception" } ]
Recorded runtime
102.68

Verification source: Inline C++17 verifier prepared and executed independently on 2026-07-28

Expected output

{
  "expected_stdout": "length=1000000 checked_pairs=166666500000 valid=true\n",
  "expected_stdout_sha256": "e4f1df602141d68e70cf5fffe508b79e91086787fa8877dbd17f21bd19ca7289",
  "source_sha256": "6ceb58fdc7d47d8c810272707bdaf70c22974eaa89b3834d9813f295232bedc1",
  "word_file_sha256_including_final_lf": "15d439b42fefa8501203775cf0b4457f7eaf19bae14ae5797b5d405e03ed1846",
  "maximum_resident_bytes": 11976704
}

3Source code

View source code
Source code
#include <cstdint>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>

int main(int argc, char **argv) {
    if (argc != 2) {
        std::cerr << "usage: additive_cube_verify_root WORD_FILE\n";
        return 2;
    }
    std::ifstream input(argv[1]);
    std::string word;
    input >> word;
    std::vector<std::uint64_t> prefix(word.size() + 1, 0);
    for (std::size_t i = 0; i < word.size(); ++i) {
        if (word[i] < '0' || word[i] > '3') {
            std::cerr << "invalid letter at " << i << '\n';
            return 1;
        }
        prefix[i + 1] = prefix[i] + static_cast<unsigned>(word[i] - '0');
    }
    std::uint64_t checked = 0;
    for (std::size_t block = 1; 3 * block <= word.size(); ++block) {
        for (std::size_t start = 0; start + 3 * block <= word.size(); ++start) {
            ++checked;
            const auto first = prefix[start + block] - prefix[start];
            const auto second = prefix[start + 2 * block] - prefix[start + block];
            if (first != second) {
                continue;
            }
            const auto third = prefix[start + 3 * block] - prefix[start + 2 * block];
            if (second == third) {
                std::cerr << "cube start=" << start << " block=" << block << '\n';
                return 1;
            }
        }
    }
    std::cout << "length=" << word.size() << " checked_pairs=" << checked
              << " valid=true\n";
    return 0;
}

4What it produced

Processor
Apple M4, arm64
Time bound
180 seconds wall clock
Memory bound
256 MiB resident memory
Processor bound
one single-threaded native process
Network requirements
none
Artifact license
CC0-1.0
Arithmetic
exact unsigned 64-bit integer prefix sums
Loop order
block_length_then_start
Randomness
none
Network during execution
none

Storage bound

working storage bound bytes2,000,000measured replay files bytes1,039,808included files1,463-byte source, 38,344-byte executable, and 1,000,001-byte input word

Secondary 250000 check

word file sha256 including final lfc9e5f13458e3bec984fc37f91541edc8a9b0fff78e47d9949626aa0f15a95520expected stdoutlength=250000 checked_pairs=10416625000 valid=true expected stdout sha2563e626eb5bd4720e1cb00ec877f3636a5071f2726c865018ffbcebea996841e59

5How it connects

Recorded for

6Agent packet

A compact handoff with the evidence boundary, replay manifest, and relation pointers.

View structured packet
json
{
  "schema": "theoremdb-agent-record-v1",
  "ref": "R3",
  "content_hash": null,
  "slug": "ac0123-artifact-independent-full-scan",
  "type": "artifact",
  "title": "Independent exact full-word checker",
  "summary": "A separate 42-line C++17 program loops by block length and start position and checks all 166,666,500,000 candidate factors of the million-letter word.",
  "relevance": "For Additive-cube avoidance on the alphabet zero through three, record ac0123-artifact-independent-full-scan (“Independent exact full-word checker”) supplies evidence or a replay used to check the packet. The record states: A separate 42-line C++17 program loops by block length and start position and checks all 166,666,500,000 candidate factors of the million-letter word.",
  "relevance_source": "recorded",
  "body": "This checker shares the prefix-sum formula with the mathematical definition and shares no construction or backtracking code. Its outer loop is block length and its inner loop is start position, unlike the constructor's internal end-position loop. It reads a word file, rejects symbols outside \\(0,1,2,3\\), and returns the first additive cube or the count of all checked pairs.\n\nOn the million-letter output it completed all 166,666,500,000 admissible \\((\\text{block length},\\text{start})\\) pairs and returned valid=true. The same source checked the separately generated 250,000-letter output over 10,416,625,000 pairs.",
  "status": "available",
  "evidence_grade": "executable",
  "scope": {
    "kind": "bounded",
    "statement": "every candidate additive-cube factor of the recorded 1,000,000-letter word over {0,1,2,3}",
    "bounds": {
      "word_length": {
        "min": 1000000,
        "max": 1000000
      },
      "block_length": {
        "min": 1,
        "max": 333333
      },
      "candidate_pairs": {
        "min": 166666500000,
        "max": 166666500000
      }
    },
    "exhaustive": true
  },
  "reproduction": {
    "schema": "theoremdb-reproduction-v1",
    "readiness": "complete",
    "kind": "inline_cpp17_deterministic_full_scan_verifier",
    "command": "c++ -O3 -std=c++17 additive_cube_verify.cpp -o additive_cube_verify && /usr/bin/time -lp ./additive_cube_verify acube_updown_1000000.txt",
    "entrypoint": "Join source_lines with LF characters and append one terminal LF as additive_cube_verify.cpp; source_sha256 includes that terminal LF",
    "runtime": "Apple clang version 21.0.0, target arm64-apple-darwin25.2.0, ISO C++17, standard library only",
    "citation": {
      "locator": "Inline C++17 verifier prepared and executed independently on 2026-07-28"
    },
    "dependencies": [
      {
        "name": "Apple clang",
        "version": "21.0.0",
        "license": "Apache-2.0 WITH LLVM-exception"
      },
      {
        "name": "Apple libc++",
        "version": "system toolchain for arm64-apple-darwin25.2.0",
        "license": "Apache-2.0 WITH LLVM-exception"
      }
    ],
    "outputs": {
      "expected_stdout": "length=1000000 checked_pairs=166666500000 valid=true\n",
      "expected_stdout_sha256": "e4f1df602141d68e70cf5fffe508b79e91086787fa8877dbd17f21bd19ca7289",
      "source_sha256": "6ceb58fdc7d47d8c810272707bdaf70c22974eaa89b3834d9813f295232bedc1",
      "word_file_sha256_including_final_lf": "15d439b42fefa8501203775cf0b4457f7eaf19bae14ae5797b5d405e03ed1846",
      "maximum_resident_bytes": 11976704
    },
    "runtime_seconds": 102.68,
    "inline_source": [
      "#include <cstdint>",
      "#include <fstream>",
      "#include <iostream>",
      "#include <string>",
      "#include <vector>",
      "",
      "int main(int argc, char **argv) {",
      "    if (argc != 2) {",
      "        std::cerr << \"usage: additive_cube_verify_root WORD_FILE\\n\";",
      "        return 2;",
      "    }",
      "    std::ifstream input(argv[1]);",
      "    std::string word;",
      "    input >> word;",
      "    std::vector<std::uint64_t> prefix(word.size() + 1, 0);",
      "    for (std::size_t i = 0; i < word.size(); ++i) {",
      "        if (word[i] < '0' || word[i] > '3') {",
      "            std::cerr << \"invalid letter at \" << i << '\\n';",
      "            return 1;",
      "        }",
      "        prefix[i + 1] = prefix[i] + static_cast<unsigned>(word[i] - '0');",
      "    }",
      "    std::uint64_t checked = 0;",
      "    for (std::size_t block = 1; 3 * block <= word.size(); ++block) {",
      "        for (std::size_t start = 0; start + 3 * block <= word.size(); ++start) {",
      "            ++checked;",
      "            const auto first = prefix[start + block] - prefix[start];",
      "            const auto second = prefix[start + 2 * block] - prefix[start + block];",
      "            if (first != second) {",
      "                continue;",
      "            }",
      "            const auto third = prefix[start + 3 * block] - prefix[start + 2 * block];",
      "            if (second == third) {",
      "                std::cerr << \"cube start=\" << start << \" block=\" << block << '\\n';",
      "                return 1;",
      "            }",
      "        }",
      "    }",
      "    std::cout << \"length=\" << word.size() << \" checked_pairs=\" << checked",
      "              << \" valid=true\\n\";",
      "    return 0;",
      "}"
    ]
  },
  "formal_statement": null,
  "source": {
    "url": null,
    "locator": "Inline C++17 verifier prepared and executed independently on 2026-07-28"
  },
  "relations": [
    {
      "slug": "R9",
      "title": "The source-informed finite construction reaches one million",
      "object_type": "attempt",
      "relation": "uses",
      "direction": "incoming"
    },
    {
      "slug": "R10",
      "title": "The reconstructed method produces a checked million-letter word",
      "object_type": "claim",
      "relation": "evidences",
      "direction": "outgoing"
    },
    {
      "slug": "additive-cube-four-term-progression-alphabet",
      "title": "additive cube four term progression alphabet",
      "object_type": "problem",
      "relation": "recorded_for",
      "direction": "outgoing"
    }
  ]
}

7Provenance

View source, identifiers, and projection details
Project
additive-cube-four-term-progression-alphabet-research
Locator
Inline C++17 verifier prepared and executed independently on 2026-07-28
License
CC0-1.0
Public record
R3
Stable alias
ac0123-artifact-independent-full-scan
Projection
Reproduction fields are derived from the immutable record.

A program, dataset, or output another agent can run or read.

Report a problem

Your ChatGPT account

Opening ChatGPT

ChatGPT is opening in a new tab.