# Reproducibility

## Overview

RU is a certificate engine for universality and obstructions in constrained nonnegative propagation. Host structures supply finite inputs. Outputs are audited certificates or finite obstruction witnesses.

## Quick start

From the root of the extracted ZIP:

- Generate the real-host Fibonacci contraction certificate (writes JSON files under `sources/ru/` and `sources/ru_bridge/`):

  python tools/ru_bridge_extractor.py --example fibonacci_contraction --alpha 0.2 --validate

- Validate all robust certificates in the project against the RU schema:

  python tools/validate_certificates.py

## Notes

- If `jsonschema` is installed, validation is full JSON Schema validation.
- If it is not installed, the validator falls back to checking only the required top-level fields.

## Extending

To extend this tool to a new host structure, add a new builder function in `ru_bridge_extractor.py` that:

- loads host data (or an extracted sector file)
- constructs a finite constraint graph, templates, and costs
- emits:
  - a bridge wrapper object under `sources/ru_bridge/`
  - a robust certificate instance under `sources/ru/`
- validates against `sources/ru/robust_certificate_schema.json`


## Additional built-in examples

- Fibonacci OG4 idle-loop obstruction:
  python tools/ru_bridge_extractor.py --example fibonacci_og4_idle --validate

- Fibonacci OG1 period-2 obstruction:
  python tools/ru_bridge_extractor.py --example fibonacci_og1_period2 --validate

- Ising OG3 no-Doeblin obstruction:
  python tools/ru_bridge_extractor.py --example ising_og3 --alpha 0.15 --validate

- Ising OG2 projection inconsistency:
  python tools/ru_bridge_extractor.py --example ising_og2_projection --alpha 0.15 --validate


## One-command regeneration + validation

python tools/run_all_examples.py


## Reproducible global report (chamberwise)

python tools/build_fibonacci_alpha_chambers_report.py


## Build the artifact index

python tools/build_artifact_index.py


## CI-style self-check

python tools/ci_selfcheck.py


## Mechanical sanity audits

python tools/audit_sanity_checks.py


## Context map

python tools/extract_string_theory_index.py


## Algorithmic witness tools

python tools/doeblin_search.py --host_instance sources/host_instances/fibonacci_contraction_instance.json --Lmax 8
python tools/doeblin_avoidance.py --host_instance sources/host_instances/fibonacci_contraction_instance.json --forbidden N_tau,N_tau
python tools/generate_certificate_from_instance.py --host_instance sources/host_instances/fibonacci_contraction_instance.json --name demo_fibonacci_contraction --Lmax 8


python tools/ru_bridge_extractor.py --example toric_og3 --alpha 0.15 --validate
