Proving Geometric Resonance Factorization

by Admin 42 views
Proving Geometric Resonance Factorization: The "Poof Pack" for PR #224

Hey guys! Let's dive into something pretty cool – the "Poof Pack," a project designed to offer a machine-verifiable, reproducible proof for a geometric-resonance factorization method. This is specifically for Pull Request #224 in the z-sandbox repository. We're talking about a 127-bit geometric-resonance factorization and the verification of its method purity, ensuring no sneaky classical methods were used. This is all about trust and transparency in the realm of complex number factorization. Ready to see how it works?

The Why and the Background

Okay, so why bother with all this? PR #224 introduced a novel approach that uses a comb formula, golden-ratio QMC, and Dirichlet sharpening – a different flavor compared to your usual algebraic methods. The aim was to ensure the method's integrity and reproducibility. Think of it as providing a bulletproof guarantee. The goal here is to make sure everyone can independently verify the results, using a clear, deterministic process. This includes verifying that only the geometric-resonance pipeline runs during the search process. We're aiming for a high level of confidence when we approve the merge.

What's the Goal?

The primary objective is to create a checked-in artifact bundle. This will allow any reviewer to reproduce the prime factors (p and q) for the 127-bit number (N) using the provided inputs. The reviewer will verify that p*q equals N, confirm the primality of p and q, and check that only the geometric-resonance pipeline was executed during the search. This entire process is about building trust in the factorization method. We aim to ensure the calculations can be verified, that the results are reproducible, and that the method operates as intended.

The Deliverables – The "Poof Pack" Unveiled!

This is where things get interesting! The "Poof Pack" includes a series of meticulously crafted deliverables, specifically within the results/geometric_resonance_127bit/ directory:

  1. Essential Run Script (method.py): This is the heart of the operation, the exact script used to run the factorization. It's instrumented, which means it's set up for detailed auditing of imports and operations. It contains all the steps, parameters and logic needed to execute the factorization.
  2. Configuration File (config.json): This file holds all the parameters used in the process. This includes mp.dps (decimal places), the number of samples, k-range, m_span, J (a parameter), the threshold, and the bias mode. This ensures that the whole experiment is reproducible.
  3. Candidates List (candidates.txt): A deduplicated list of candidates, representing a successful run. This helps with the verification process.
  4. Metrics Summary (metrics.json): Provides key performance indicators like wall-time, candidate counts, and the keep:tested ratio, along with notes on CPU and memory usage. It shows the efficiency of the run.
  5. Comprehensive Log (run.log): A verbatim record of everything that appeared in the standard output and standard error, including timestamps. This provides complete transparency into the process.
  6. Checksums Verification (checksums.txt): Contains SHA-256 hashes for all the above files, ensuring their integrity and preventing tampering.
  7. Reproducibility Guide (README.md): This file provides the precise command and environment required to reproduce the factorization. This ensures others can verify the results.

Method-Purity Proof

To ensure the method's purity, we've included:

  • A static map connecting each function in method.py to its corresponding protocol steps (comb, QMC, Dirichlet).
  • Runtime guards that log and block any imports or calls indicative of methods like ECM, NFS, Pollard, or GCD loops. Any such activity is captured in the run.log.

Justifications & Scaling

  • docs/methods/geometric/THRESHOLD_JUSTIFICATION.md: Explains the parameter choices, specifically the threshold value, with a sensitivity analysis. This justifies the choices made in the geometric resonance method.
  • SCALING_ANALYSIS.md: Presents empirical data across different bit-sizes, discusses the complexity of the method, and notes the practical limits. This helps to understand how the method performs with larger numbers.

Deterministic CI (Continuous Integration)

  • A GitHub Actions job to verify the hashes, multiply p*q, run primality checks, and confirm the integrity of the artifacts. It makes sure everything is working as it should.
  • Committed test output or deterministic tests for the included test files.

Acceptance Criteria – How Do We Know It Works?

The following criteria will determine if the project is successful:

  • The artifact bundle must exist at the documented path, and its hashes must match those in checksums.txt. This ensures the files haven't been tampered with.
  • Running python -u method.py --config results/.../config.json in the pinned environment must reproduce the committed factors. The run.log should show the exact same outputs. This verifies that the method is reproducible.
  • The contents of candidates.txt and metrics.json must be consistent (regarding counts, wall-time, and keep:tested ratio). This confirms the metrics are accurate.
  • The repository should include an explicit statement and artifact proving that no ECM, NFS, Pollard, or GCD cycles were used. Instrumentation output should be included. This is a crucial element for ensuring method purity.
  • Tests must pass locally, and CI logs must be committed or re-runnable. Primality checks will use a named function (mpmath.isprime/sympy.isprime) with logs. This ensures that everything is working as intended.
  • Threshold and parameter choices should be justified with a short sensitivity analysis and should not be N-specific. Include held-out semi-primes (80/96/112-bit) with outcomes. This makes sure that the parameters chosen are not specific to a certain number.

The "Poof Pack" Non-Goals – What We're Not Doing

It's important to be clear about what the "Poof Pack" won't do. We're not aiming to run the full factor search in CI. Furthermore, we aren't changing the geometric-resonance method itself. The focus here is on proof and reproducibility, not on tweaking the algorithm.

Implementation Notes – Getting it Done

Here are some implementation notes to guide the process:

  • Pin the Python version, mpmath, and include OS/CPU notes in README.md. Also, incorporate reproducible seed handling where applicable.
  • Use a single, definitive method.py referenced by both CI and the documentation.
  • Include a small visual or ASCII candidate-density readout and a tiny script that calculates the keep:tested ratio from the artifacts.

Definition of Done – Reaching the Finish Line

The project will be considered complete when:

  • All the acceptance criteria pass both locally and via CI. This ensures that all the necessary requirements are met.
  • A reviewer can follow the README.md without assistance to verify p, q, hashes, primality, and method purity from the committed bundle. No external claims are necessary. The process is completely self-contained and verifiable.

---This process is a great example of how to ensure the results of complex number factorization methods are reliable, reproducible, and trustworthy. The Poof Pack helps us achieve that.

---Reference (review asks summarized): deterministic artifact bundle, checksums + exact command/env, proof of no classical factoring, committed test outputs/determinism, parameter justification & scaling, and a minimal CI job for verification.