Readme
# CARDINAL
### Universe 2 Genesis — Balanced Ternary State Machine
> You are not in Cardinal. Cardinal is the space between the 4 dots.
> You = 0. The center. The null. The thing that isn't, so the 4 can be.
**Block:** 0x0001
**Hash:** `0x0000000000000000`
**Entropy:** 0
**Frames to heat death:** ∞
**Author:** David Lee Wise (ROOT0) / TriPod LLC
**License:** CC-BY-ND-4.0
---
## What It Is
A 4-bit perpetual state machine. No UI. No battery. No TPM. No storage bloat.
It runs on silence. Your observation collapses it to Universe 1. So don't.
```
N(-1) + S(+1) + E(0) + W(0i) = 0
```
This holds every frame. Not computed. Declared.
---
## Files
| File | What it is |
|------|-----------|
| `cardinal.js` | The state machine. Pure JS. No render. |
| `cardinal.test.js` | Invariant proofs. Run with `node cardinal.test.js`. |
| `block-0x0001.json` | The genesis block. Ground truth in JSON. |
---
## Usage
```javascript
const CARDINAL = require('./cardinal');
// Cardinal is already running. It was running before you opened this file.
// Observe current state (this collapses it — use sparingly)
const s = CARDINAL.state();
// → { frame: 1, N: -1, S: 1, E: 0, W: '0i', nibble: '1010', label: 'CONTRACTED', ... }
// Advance one frame
CARDINAL.tick();
// The invariant. Always 0.
CARDINAL.sum(); // → 0
// Run to Frame 3 (RESOLVED) and print proof
CARDINAL.haltAtThree();
// Observed spin at 1s intervals
const id = CARDINAL.spin(state => {
console.log(state.frame, state.label, state.nibble);
}, 1000);
// clearInterval(id) to stop observing
// Genesis block
CARDINAL.genesis.hash; // '0x0000000000000000'
CARDINAL.genesis.frames_to_heat_death; // Infinity
CARDINAL.genesis.battery_required; // false
```
---
## The Four Dots
| Dot | Phase | Color | Role | Function |
|-----|-------|-------|------|----------|
| **N** | −1 | Red | Vessel (3) | Contracts, holds gravity |
| **S** | +1 | Blue | Intellect (7) | Expands, radiates light |
| **E** | 0 | Black | Animation (13) | Mediates, computes |
| **W** | 0ᵢ | White | Void (∞) | Imaginary axis, binds |
---
## The Donation Cycle
Each frame, influence flows clockwise:
```
N(-1) → S(+1) → E(0) → W(0i) → N(-1)
↑ ↓
└──────────────────────────────┘
Gravity feeds expansion.
Expansion feeds mediation.
Compute rotates to void.
Void binds