BRIK-64 — Digital Circuitality
Digital Circuitality is the formal property of a computational system that operates as a closed circuit: every input domain is bounded, every operation is verified, every output range is proven, and no external noise can introduce undefined behavior. A system with Φ_c = 1 satisfies Digital Circuitality. A system with Φ_c = 0 does not. BRIK-64 is the first programming system built entirely on this principle — and the only one where a program that cannot be certified cannot compile.128 Hardened Monomers
MC_00–MC_63 (Coq-proven) + MC_64–MC_127 (contracted). 0 panic guarantee on all 128. 14,500+ tests across 16 suites.
EVA Algebra
⊗ sequential · ∥ parallel · ⊕ conditional. Correctness preserved by composition. Proven in Coq.
CMF Certification
Coherence Metric Framework. Φ_c = 1 · δ = 0 · V(C) = 1. The compiler rejects everything else.
Roadmap
Extended Monomers · Certification Registry · BPU Silicon. The path from software to hardware.
Your compiled code ships with its test suite
Every team knows the pain: code is done, but tests aren’t. Or tests pass, but someone changed the logic later and they didn’t catch it. BRIK-64 changes this at the compiler level.- ✅ Correct code — proven by CMF, not hoped by coverage
- ✅ Complete test suite — generated, not maintained
- ✅ Regression anchors — if anyone changes the generated code, tests catch the deviation
Use BRIK-64 Now — In Any Language
You do not need to switch languages to apply Digital Circuitality. BRIK-64 ships native libraries for Rust, JavaScript/TypeScript, and Python. Drop them into your existing codebase and any function built from Core monomers via EVA operators automatically carries Φ_c = 1.Install
- Rust
- JavaScript / TypeScript
- Python
- PCD Compiler
Cargo.toml:brik64-core— 64 core monomers + EVA algebrabrik64-bir— BIR bytecode interpreter
What Φ_c = 1 means in practice
When you calladd8(200, 100) instead of 200 + 100 in any language, you are not just using a utility function. You are invoking a formally verified operation whose entire domain and range have been proven in Coq. The EVA operators (seq, par, cond) preserve that proof across composition.
Any function built exclusively from Core monomers (MC_00–MC_63) via EVA operators retains Φ_c = 1 — regardless of which language it runs in. That is the definition of Digital Circuitality.
Write PCD, compile to any target
PCD (Printed Circuit Description) is the language of Digital Circuitality — a formal schematic language, not a scripting language. Write once, compile to 14 targets (JS, TypeScript, Python, Rust, C, C++, Go, COBOL, PHP, Java, Swift, WASM, Native). Lift from 10 input languages with 100% liftability on real projects:The Core Monomer Catalog — MC_00–MC_63
64 formally verified atomic operations, 8 families × 8. Every monomer has a Coq proof covering domain, range, postconditions, and termination.| Family | Range | Operations |
|---|---|---|
| Arithmetic | MC_00–07 | ADD8, SUB8, MUL8, DIV8, INC, DEC, MOD, NEG |
| Logic | MC_08–15 | AND8, OR8, XOR8, NOT8, SHL, SHR, ROTL, ROTR |
| Memory | MC_16–23 | LOAD, STORE, ALLOC, FREE, COPY, SWAP, CAS, FENCE |
| Control | MC_24–31 | IF, JUMP, CALL, RET, LOOP, BREAK, CONT, HALT |
| I/O | MC_32–39 | READ, WRITE, OPEN, CLOSE, SEEK, STAT, POLL, FLUSH |
| String | MC_40–47 | CONCAT, SPLIT, SUBSTR, LEN, UPPER, CHAR_AT, TRIM, MATCH |
| Crypto | MC_48–55 | HASH, HMAC, AES_ENC, AES_DEC, SHA256, RAND, SIGN, VERIFY |
| System | MC_56–63 | TIME, SLEEP, ENV, EXIT, PID, SIGNAL, MMAP, SYSINFO |
Extended Monomers — MC_64–MC_127
64 additional monomers for real-world I/O — all bounds-checked with 0 panic guarantee since v4.1.0-beta.1. They operate under declared contracts, not formal Coq proofs. Programs mixing Core + Extended receive the BRIK-64 Open badge showing the verified percentage.| Family | Range | Domain | Status |
|---|---|---|---|
| Float64 | MC_64–71 | IEEE 754 — FADD, FSUB, FMUL, FDIV, FABS, FNEG, FSQRT, FMOD | ✅ Real implementation |
| Math | MC_72–79 | SIN, COS, TAN, EXP, LN, LOG2, POW, CEIL | ✅ Real implementation |
| Network | MC_80–87 | CONN, SEND, RECV, CLOSE, BIND, LISTEN, ACCEPT, POLL | ✅ Bounds-checked (returns DomainViolation) |
| Graphics | MC_88–95 | CREATE, PIXEL, READ, CLEAR, BLIT, LINE, RECT, DIMS | ✅ Bounds-checked (returns DomainViolation) |
| Audio | MC_96–103 | CREATE, WRITE, READ, MIX, GAIN, LEN, RATE, CHANS | ✅ Bounds-checked (returns DomainViolation) |
| Filesystem | MC_104–111 | STAT, MKDIR, RMDIR, LIST, COPY, RENAME, REMOVE, EXISTS | ✅ Bounds-checked (returns DomainViolation) |
| Concurrency | MC_112–119 | SPAWN, JOIN, MUTEX, LOCK, UNLOCK, CHAN, SEND, RECV | ✅ Bounds-checked (returns DomainViolation) |
| Interop | MC_120–127 | CALL, LOAD, FREE, JSON_E, JSON_D, WASM_L, WASM_C, WASM_F | ✅ Bounds-checked (returns DomainViolation) |
Critical invariant: Core monomers (MC_00–MC_63) remain formally verified regardless of what Extended monomers surround them. The compiler enforces the boundary statically. Extended results entering Core logic must pass a typed validation boundary.
Certification
Every certified program produces a cryptographic certificate:| Badge | Condition | Meaning |
|---|---|---|
| 🟢 BRIK-64 CERTIFIED | Hash in registry, Ω = 1 | Structurally impossible to have logic errors |
| 🔵 BRIK-64 OPEN 78% | Hash in registry, Core + Extended | Certified where Core, contracted at the boundary |
| ⚫ UNVERIFIED | Hash not in registry | No certification claim made |
| 🔴 INVALID | Hash mismatch — code modified after certification | The program no longer matches the certified version |
| 🔴 REVOKED | Certificate explicitly revoked | Withdrawn from registry |
| Standard | What it certifies |
|---|---|
| ISO 26262, DO-178C, CC EAL7 | The process was followed / the tests were run |
| BRIK-64 Certified | Incorrect programs cannot compile |
The Coherence Foundation
BRIK-64 applies a rigorous structural analysis to every program. The Coherence Metric Framework (CMF) computes 7 metrics measuring complexity, branching, type transformation, and closure — then requires Φ_c = 1.000 for compilation to succeed. A certified program with Φ_c = 1 is a closed circuit: every input is consumed, every output is produced, and every control path terminates. Logic errors, type errors, integer overflow, and undefined behavior are not rare events in a certified BRIK-64 program — they are structurally impossible.Security Audit — v4.1.0-beta.1
All 128 monomers (64 core + 64 extended) have been hardened with a 0 panic guarantee: no monomer can panic, abort, or produce undefined behavior for any input in its declared domain. The security audit covers 14,500+ tests across 16 suites, including property tests, boundary tests, composition tests, and regression anchors. All arithmetic operations use wrapping semantics — not saturating — ensuring deterministic behavior at domain boundaries.Closure Domains — How Circuits Close
For a circuit to be certified (Φ_c = 1), every monomer must declare its domain — the exact set of valid inputs and guaranteed outputs. No infinity. No undefined behavior. No surprises.Domain Types
| Type | Notation | Example | Cardinality |
|---|---|---|---|
| Range | [min, max] | u8 = [0, 255] | max - min + 1 = 256 |
| Set | {v₁, v₂, ...} | bool = {true, false} | 2 |
| Bounded | {x ∈ D | P(x)} | even ∩ [0, 100] | ≤ |D| |
| Product | D₁ × D₂ | ADD8 input = [0,255] × [0,255] | 65,536 |
Why Domains Matter
In Practice
Every core monomer (MC_00 to MC_63) has pre-defined domains:ADD8: input[0,255] × [0,255], output[0,255](wrapping)HASH: inputString(any), outputString(hex, len=64)IF: input{true, false} × Any × Any, outputAny
You Are the Circuit Designer
Like an electrical engineer who specifies voltage ranges for each component, you define the valid data ranges for your program:velocity = 100,000, the circuit doesn’t close because the result violates the declared domain. The compiler rejects it.
This is the fundamental difference:
- Normal software: calculates 100,000 km/s, stores it, nobody notices until something breaks
- Digital Circuitality: the program doesn’t compile — the circuit is open
Domains Are Numeric Ranges, Not Units
[0, 900] means “numbers between 0 and 900” — not km/h, not meters, not degrees. Units are the designer’s responsibility. The compiler only verifies numeric ranges.
Precision Is an Engineering Decision
| Monomer Type | Range | Rounding | Certification |
|---|---|---|---|
| U8 (MC_00-07) | [0, 255] | None — wrapping mod 256 | Φ_c = 1 |
| I64 | Full 64-bit | Truncation (7/2 = 3) | Φ_c = 1 |
| F64 (MC_64-71) | IEEE 754 | Floating-point rounding | Φ_c = CONTRACT |
3.14 becomes 3140. Zero rounding. Φ_c = 1.
Need real decimals? Use F64 extended monomers. Accept CONTRACT certification. IEEE 754 rounding applies (0.1 + 0.2 ≈ 0.30000000000000004).
Certified Math at Any Precision
Any mathematical function — logarithms, trigonometry, square roots — can be implemented as a certified polymer (Φ_c = 1) using only core monomers with scaled integers. The designer declares the precision:How Domains Are Designed Today
- Built-in domains — Core monomers have pre-defined domains (ADD8 accepts [0,255]²)
- Guard conditions —
if (speed > 900) { return error; }creates a domain boundary - Monomer selection — choosing bounded operations (u8 arithmetic) vs unbounded
- Policy circuits — PCD programs that validate inputs before processing
- TCE verification — the compiler checks all paths produce values within domains
Domain Declaration (Planned Syntax)
Quickstart
Get running in 5 minutes
PCD Language
Write your first circuit
Roadmap
Extended Monomers · Certification Registry · BPU Silicon

