EVA Algebra
EVA Algebra is the mathematical framework that governs how monomers compose into programs. Every BRIK-64 program is an expression in EVA Algebra — not a sequence of imperative statements, but a structured combination of verified atomic units. The name EVA stands for the three operators:| Symbol | Name | PCD syntax | Mathematical property |
|---|---|---|---|
⊗ | Sequential | statement order | Associative, identity = Id |
∥ | Parallel | parallel { } block | Commutative + Associative |
⊕ | Conditional | if / else | Finite branching, deterministic |
Formal Definitions
Types
Compatibility
Composition is not always valid. Sequential composition requires type compatibility:Compat(A, B) does not hold, A ⊗ B is a compile-time error. The planner enforces
this at the CPF stage — there is no runtime type mismatch in a certified program.
Operator 1: Sequential Composition (⊗)
A ⊗ B means: run A, then run B with A’s output as B’s input.
Formal axioms
In PCD
Sequential composition is implicit — statement order in a function body is⊗:
⊗ from data dependencies. If B uses the output of A, they are sequential.
If B does not use A’s output, the planner may classify them as ∥ (parallel) if side-effect-free.
Closure Theorem
Closure under ⊗: If
Φ_c(A) = 1 and Φ_c(B) = 1, then Φ_c(A ⊗ B) = 1.This is the central theorem that makes composability work. You never need to re-certify a
program after combining two certified sub-programs sequentially. Proof: Paper III, Theorem 3.4.Operator 2: Parallel Composition (∥)
A ∥ B means: run A and B concurrently, with complete isolation between them. Neither
A nor B can observe or modify the other’s state. Outputs are collected as a tuple.
Formal axioms
Isolation enforcement
The planner enforces isolation at the CPF level. IfA writes to a memory location that B
reads (or vice versa), the planner rejects A ∥ B with a compilation error. You must
restructure as A ⊗ B (sequential) or introduce a synchronization barrier via MC_23.FENCE.
In PCD
Closure Theorem
Closure under ∥: IfΦ_c(A) = 1 and Φ_c(B) = 1, then Φ_c(A ∥ B) = 1.
The thermal metrics compose additively: E_c(A ∥ B) = E_c(A) + E_c(B). This is the reason
the TCE can compute metrics for large programs incrementally — parallel sub-circuits are
independent thermal units.
Operator 3: Conditional Composition (⊕)
A ⊕_b B means: evaluate boolean b, then run A if b = true, or B if b = false.
Only one branch executes. The Landauer cost is the cost of the chosen branch plus the cost of
evaluating the condition.
Formal axioms
In PCD
⊕ tree:
Closure Theorem
Closure under ⊕: IfΦ_c(A) = 1 and Φ_c(B) = 1, then Φ_c(A ⊕ B) = 1.
The TCE computes H_d (decision entropy) across all ⊕ nodes — this is where branching
structure contributes to thermodynamic cost.
Critical Non-Property: Distributivity Does NOT Hold
How the Planner Infers EVA Algebra
The planner performs a data-flow analysis pass over the SSA-form CPF to annotate every composition node with its EVA operator:"eva" field of each function and
of each sub-expression block.
EVA Algebra in BIR Bytecode
BIR (BRIK IR) encodes EVA structure in the bytecode header:- Verify at load time that the circuit structure matches what the TCE certified
- Enable speculative parallel execution of
∥blocks on multi-core hardware - Apply the LOAD-take optimization: in a
SEQblock, a value loaded and immediately stored into the same variable triggersmem::replaceinstead ofclone
Examples: Real PCD Compositions
SHA-256 pipeline (⊗ chain)
Dual signature verification (∥ composition)
Policy circuit (⊕ gate)
The 207 Coq Proofs
EVA Algebra is not claimed — it is proven. Thetheory/papers/ directory contains:
| File group | Count | Content |
|---|---|---|
F0_arithmetic.v through F7_system.v | 8 files | Per-monomer correctness + termination |
eva_seq.v | 1 file | All sequential composition theorems |
eva_par.v | 1 file | All parallel composition theorems (commutativity, associativity, isolation) |
eva_cond.v | 1 file | All conditional composition theorems (determinism, finiteness) |
eva_closure.v | 1 file | The master closure theorem: certified ⊗/∥/⊕ certified = certified |
eva_nondist.v | 1 file | Proof that distributivity does NOT hold |
tce_bounds.v | 1 file | Thermodynamic bound proofs |
bootstrap_fixpoint.v | 1 file | Self-compilation fixpoint proof |
| Other lemmas | ~192 files | Supporting lemmas, type safety, SSA correctness |
The
Admitted count was driven to zero during the audit of 2026-03-07. Every previously
admitted lemma was either proven or replaced with an explicit DEFERRED comment documenting
the open proof obligation. There are zero silent assumptions in the proof base.