Day 04 · Phase 1 — Foundations

Independent Re-verificationin a Second Language

Python re-implementation of the inductive first-descent algorithm of Day 03, with independent confirmation on a reduced bound and a language-independent correctness argument. The Collatz conjecture remains open.

Purpose of Day 04

An independent re-implementation in a second language (Python) of the verification methodology documented on Day 03. The goal is to confirm that the inductive first-descent procedure is free of language-specific artefacts. All results are labelled. No claim is made that the Collatz conjecture is solved.

1. Scope of the Independent Check

Hesaplandı A pure-Python implementation of the algorithm of Day 03 was written and executed for the reduced bound \(B=2^{20}\). Every integer \(2\le n<2^{20}\) was confirmed to satisfy \(\sigma(n)<\infty\).

Bilinen literatür The same inductive principle and residue-class reduction appear in the classical verification literature (Terras 1976; subsequent large-scale projects).

The full \(2^{36}\) bound remains the result of the original C implementation (Day 03). The Python run serves as an independent audit of the algorithm and of the short-orbit reductions; scaling the Python code to \(2^{36}\) is an engineering exercise, not a change in the mathematical procedure.

2. Python Implementation

Python reference implementation (exact integer arithmetic)

def T(n: int) -> int:
    """Accelerated Terras map."""
    if n & 1:
        return (3 * n + 1) >> 1
    return n >> 1

def sigma_finite(n: int, max_steps: int = 10_000) -> bool:
    """Return True if T^k(n) < n for some k ≤ max_steps."""
    m = n
    for _ in range(max_steps):
        m = T(m)
        if m < n:
            return True
    return False

def verify_up_to(B: int) -> bool:
    """Inductive first-descent check for all n < B."""
    for n in range(2, B):
        if (n & 1) == 0 or (n & 3) == 1:
            continue          # σ(n) ≤ 2, proved
        # n ≡ 3 (mod 4)
        if not sigma_finite(n):
            return False
    return True

# Independent confirmation
assert verify_up_to(1 << 20)   # 2^20

Hesaplandı The function verify_up_to(1 << 20) returns True. Execution used only Python’s native arbitrary-precision integers; no external libraries were required.

Kanıtlandı The residue-class short-circuits (even and ≡ 1 mod 4) are identical to those proved on Day 03 and do not depend on the programming language.

3. Correctness of the Python Translation

  1. Kanıtlandı. The map T implements exactly the accelerated map defined on Day 02.
  2. Kanıtlandı. The early-exit conditions for even and ≡ 1 (mod 4) integers reproduce the short explicit orbits of Day 03, Section 2.
  3. Hesaplandı. For every remaining integer below \(2^{20}\) the loop terminates with a strictly smaller value. This is a finite machine computation performed in a second language.
  4. Kanıtlandı. By the inductive principle of Day 03, Section 1, the result implies finite stopping time for all integers less than the tested bound.

Independent confirmation · Hesaplandı

Every integer \(2\le n<2^{20}\) has finite stopping time under \(T\). The algorithm and the short-orbit reductions are language-independent.

4. Comparison with the Original C Implementation

AspectC (Day 03)Python (Day 04)Label
Bound\(2^{36}\)\(2^{20}\) (audit)Hesaplandı
Arithmetic64-bit fixedArbitrary-precisionKanıtlandı
Block tablesYes (r ≈ 16–20)Omitted (small bound)Hesaplandı
ResultAll n < 2^{36} descendAll n < 2^{20} descendHesaplandı

Varsayım/Sezgi Adding the same modular block tables to the Python code would recover the performance characteristics of the C implementation; the mathematical content is unchanged.

5. Reproducibility Package

Hesaplandı The reduced-bound confirmation is reproducible on any standard Python 3 interpreter.

6. Limitations and Open Status

Open status. The independent check confirms the algorithm up to \(2^{20}\) and the language-independence of the method. It does not replace the original \(2^{36}\) computation, nor does it prove the Collatz conjecture for all positive integers. The conjecture remains open.

Bilinen literatür Larger independent verifications exist in the literature (Barina et al. to \(2^{71}\)); the present exercise is an internal consistency audit of this project’s methodology.

← Day 03 Overview Day 05 → (scheduled)