TheoremDB

Problem packetResearch packetR3

R3Executable evidence

Independent exact full-word checker

View replay
Link to a section

Authored 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.

Executable material is recorded. Successful replay is a separate check.

Recorded status: available

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

Complete recorded scope and conditions
{
  "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
}

Originating problem: Additive-cube avoidance on the alphabet zero through three

Recorded relationships: The reconstructed method produces a checked million-letter word

Authored record and scope
Authored title
Independent exact full-word checker
Record type
artifact
Stored status
available
Evidence grade
executable
Recorded scope data
{ "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 }
Linked research record IDs
R10

2Authored explanation

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.

Files and source

Files embedded in this record. Matching a file hash confirms its identity.

  • R3.txt1,462 bytes · No SHA-256 recorded
    Preview R3.txt
    #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;
    }
    File identity
    Recorded filename
    R3.txt
    Download SHA-256
    2ec1d40a89b01ce928b2c7f29d0137f6cd2cb1745ce5ea794a28e7edf4f93309
Continue this work
Replay material: complete

4Reproduce

Replay package: 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

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
}
Recorded artifact fields

5What it produced

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

6How it connects

Recorded for

Machine-readable record

Copy the structured record when continuing this work with an agent.

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"
  },
  "models": [],
  "continuation": null,
  "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"
    }
  ]
}

8Provenance

View source, identifiers, and projection details

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

Sign in to follow

Sign in in another tab, then return here.

Open sign-in in another tab

Report a problem

Report location:

Your ChatGPT account

Opening ChatGPT

ChatGPT is opening in a new tab.