Arcmix is a collection of generated Rust cases built around ARC — Answer, Reason, Check — producing answers, explaining them, and verifying them with explicit checks.
An ARC program does three things:
A useful way to read this repository is as teaching material for an LLM acting as a student programmer. The target is not a mysterious giant system that emits polished text. The target is a small program that can be written, inspected, rerun, criticized, and improved. In that teaching setup, the student should learn to produce code that answers a precise question, explains its reasoning in a compact witness, and then verifies the result with explicit checks instead of asking for trust.
That teaching angle matters because it pushes toward the right habits: keep the data explicit, keep the logic local, keep the question precise, and make correctness visible in the running artifact. The goal is not just to compute, but to compute in a way that stays easy to inspect, explain, and challenge. That is the practical value of the ARC approach: each run leaves an auditable trail instead of a black box. This follows the core ARC idea that trustworthy computation should be self-contained, repeatable, and verifiable at runtime.
These examples are organized around a few simple ARC principles:
In this repository, the programs are generated with GPT and iteratively refined under human guidance. They are specialized for speed, but they still follow the same ARC discipline: answer the question, explain the answer, and verify the answer. Rather than using a generic logical reasoner, arcmix uses generated, task-specific Rust cases that follow an Answer–Reason–Check discipline. That also makes them good exemplars for teaching or evaluating an LLM as a student programmer: the deliverable is not merely source code, but a runnable artifact whose reasoning and checks are visible at the interface.
There is a useful family resemblance between the ARC style used here and Andrei Ershov’s idea of mixed computation. In Ershov’s formulation, a computation can be split into a part that is carried out now, using the information already available, and a residual program that is left to run later on the still-unknown part of the input. In modern terms, that is closely related to partial evaluation and program specialization.
Arcmix is not a classical mixed-computation system, but it often follows a similar engineering instinct. Instead of shipping a large generic reasoner, it generates a smaller task-specific Rust artifact that has already absorbed much of the problem structure: the rules, the data layout, the query shape, and the expected checks. What remains is a compact executable that can run fast, expose its reasoning in a local form, and validate its own output.
The main difference is emphasis. Classic mixed computation is usually introduced as a way to specialize programs and obtain efficient residual code. ARC adds a stronger interface discipline around that specialized artifact: the program should not only compute the answer, but also present a short reason and perform explicit checks that can fail loudly. In that sense, arcmix can be read as borrowing part of the spirit of mixed computation while redirecting it toward auditable, benchmarkable, student-readable proof artifacts.
For readers who want the historical connection, see Andrei P. Ershov, Mixed computation: Potential applications and problems for study (1982), and the later literature on partial evaluation and mixed computation.
That structure has practical benefits:
A good ARC check is not a decorative success message. It should be a concrete test that can actually fail.
In this repository, good checks try to have one or more of these properties:
That means the Check section is meant to resist self-certification. The best cases do not merely restate the main computation path; they challenge it.
collatz-1000A computational check of the Collatz conjecture in src/collatz_1000.rs.
It models:
n -> n / 2 for even nn -> 3n + 1 for odd n1 through 1000027control-systemA small rule-based control example in src/control_system.rs.
It models:
measurement10/2control1/2 rules for actuator1 and actuator2true :+ control1(_, _) as query satisfieddeep-taxonomy-100000A specialized forward-chaining taxonomy benchmark in src/deep_taxonomy_100000.rs.
It models:
Ind has class N(0)N(i) -> N(i+1), I(i+1), J(i+1)N(100000) -> A2A2 -> goal reachedThis version is specialized for speed and does not use a slower generic triple engine.
delfourA Rust translation of Ruben Verborgh’s Delfour Insight Economy phone/scanner demo in src/delfour.rs.
It models:
euler-identityAn exact arithmetic version of Euler’s identity in src/euler_identity.rs.
This version uses direct integer arithmetic over a small ExactComplex type.
It mirrors the mathematical structure:
exp(i*pi) exactly as (-1, 0)(1, 0) to obtain (0, 0)1fibonacciA direct Fibonacci computation in src/fibonacci.rs.
This version computes the requested values with iterative Rust and BigUint.
It prints:
F(0)F(1)F(10)F(100)F(1000)goldbach-1000A computational check of Goldbach’s conjecture in src/goldbach_1000.rs.
It models:
1000 with a sieve4 through 1000n = p + q1000gpsA route-planning example in src/gps.rs.
It models:
The translation uses Rust concepts like City, Action, Stage, Description, and Route.
kaprekar-6174A computational proof of Kaprekar’s constant in src/kaprekar_6174.rs.
It models:
1111 and 00006174<= 7 iteration bound2111 -> 0999 -> ... -> 6174matrix-mechanicsA toy matrix-mechanics example inspired by Werner Heisenberg’s matrix formulation in src/matrix_mechanics.rs.
It models:
HX, XH, and the commutator [H, X]pn-junction-tunnelingA toy PN-junction tunneling example inspired by tunnel-diode / Esaki-diode behavior in src/pn_junction_tunneling.rs.
It models:
transistor-switchA toy transistor-switch example inspired by a BJT used as an ON/OFF switch in src/transistor_switch.rs.
It models:
polynomialA quartic polynomial consistency check in src/polynomial.rs.
It models the two quartic outputs shown in the original example material and verifies:
odrl-dpv-ehds-risk-rankedAn ODRL + DPV + EHDS risk-ranking example in src/odrl_dpv_ehds_risk_ranked.rs.
It models:
base risk + need importance, capped at 100path-discoveryA path-finding example in src/path_discovery.rs.
It models:
(from, to) edgessudokuA generic Sudoku solver in src/sudoku.rs.
It models:
src/main.rs — CLI dispatchersrc/report.rs — structured ARC report model used for JSON outputsrc/collatz_1000.rs — Collatz conjecture benchmark translationsrc/control_system.rs — control system benchmark translationsrc/deep_taxonomy_100000.rs — specialized taxonomy benchmarksrc/delfour.rs — Delfour phone/scanner insight examplesrc/euler_identity.rs — Euler identity benchmark translationsrc/fibonacci.rs — Fibonacci benchmark translationsrc/goldbach_1000.rs — Goldbach conjecture benchmark translationsrc/gps.rs — GPS benchmark translationsrc/kaprekar_6174.rs — Kaprekar 6174 proof examplesrc/matrix_mechanics.rs — matrix mechanics toy examplesrc/odrl_dpv_ehds_risk_ranked.rs — ODRL/DPV/EHDS risk-ranking casesrc/path_discovery.rs — path discovery benchmark translation plus generated airport and flight datasrc/pn_junction_tunneling.rs — PN-junction tunneling toy examplesrc/polynomial.rs — polynomial benchmark translationsrc/transistor_switch.rs — transistor as on/off switch toy examplesrc/sudoku.rs — generic Sudoku solverThe package name is arcmix, so a release build produces target/release/arcmix.
Default case:
cargo run --release
Explicit cases:
cargo run --release -- collatz-1000
cargo run --release -- control-system
cargo run --release -- deep-taxonomy-100000
cargo run --release -- delfour
cargo run --release -- euler-identity
cargo run --release -- fibonacci
cargo run --release -- goldbach-1000
cargo run --release -- gps
cargo run --release -- kaprekar-6174
cargo run --release -- matrix-mechanics
cargo run --release -- path-discovery
cargo run --release -- pn-junction-tunneling
cargo run --release -- polynomial
cargo run --release -- transistor-switch
cargo run --release -- sudoku
Structured JSON output for one case:
cargo run --release -- collatz-1000 --format json
Structured JSON output for the whole suite:
cargo run --release -- --all --format json
Snapshot management from the repository root:
cargo run --release -- show sudoku
cargo run --release -- show sudoku json
cargo run --release -- refresh
cargo run --release -- check
arcmix supports two stable output forms:
--format jsonThe recommended workflow is:
The arcmix binary handles this directly when you run it from the repository root. Because snapshots are regular files in the repository, intentional output changes show up as normal diffs in version control. If you add or grow a case, run cargo run --release -- refresh, review the snapshot diff, and commit it together with the code change.
cargo run --release -- refresh
cargo run --release -- check
What it does:
snapshots/text/snapshots/json/all.txt, all.json, and list.txtcheckThat gives a practical separation between:
This is especially useful for ARC programs because the output is part of the artifact: the answer, the reason why, and the executable checks are all meant to stay auditable and reproducible.
snapshots/
text/
<case>.txt
all.txt
list.txt
json/
<case>.json
all.json
List available cases:
cargo run --release -- --list
Run all cases in sequence:
cargo run --release -- --all
Each case prints a short three-part story:
Where possible, the check section uses more than one line of evidence, so the program does not rely on a single computation path to certify its own output.
Each case run also reports elapsed time in milliseconds on stderr, with ANSI color for the timing line.