You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## What
Implements route-to-mvp **Phases 2, 3 and 4** from STATE.a2ml — the
repo's first actual kernel code — plus the honesty pass that keeps every
doc inside what is built.
- **L2 (Phase 2)**: `Anytype.Grade.Algebra` — a `GradeAlgebra` record
whose ordered-semiring laws are *proof fields*, so an unlawful algebra
is unrepresentable. Instances: affine `{0,1,ω}` (mirrors AffineScript
`lib/quantity.ml` cell-for-cell, incl. the `ω·1=ω` BUG-001 rule) and
exact-usage `ℕ`.
- **L1 (Phase 3)**: usage-counting bidirectional checker for a
simply-graded λ-calculus; the type-index language has no recursion
constructor, so type-level computation is total *by construction*
(syntactic totality gate, `%default total`, no `believe_me`/holes
anywhere); conversion = normalise-and-compare at one site.
- **Seam (Phase 4, both halves)**: `Abi.{Types,Layout,Foreign}`
rewritten from template demos to anytype's wire contract (codes proven
injective; request/response layouts proven `CABICompliant`);
`anytype-check` CLI with a total fuel-bounded S-expression reader; Zig
0.16 `anytype_check` export with comptime layout asserts. MVP transport:
spawned process (stated in the ffi README).
- **Gates**: `just test` (kernel build + 19-case golden matrix + 8 seam
tests + `zig build test`), `scripts/check-idris2-proofs.sh` (manifest
over every `.idr`; **missing prover = FAIL**; the 5 never-compiling
template proof modules are quarantined and must keep failing), and
`.github/workflows/idris2-proof.yml` — the first CI in this repo that
checks any Idris2. The fake exit-0 `build/just/proofs.just` recipes are
deleted.
- **Truth pass**: README status table + WARNING, EXPLAINME, AFFIRMATION
(still an unsigned draft), STATE.a2ml (10→40%, Phases 2-4 → 100),
ANCHOR.a2ml systemet pin discharged with commit `ba5930dc`,
PROOF-STATUS/ROADMAP de-templated, `.tool-versions` idris2 0.7.0 + zig
0.16.0, mise.toml purged of template runtime residue.
## The headline demonstration
The same rules under two algebras (golden matrix + CLI tests):
```
echo '(lam 1 bool tt)' | anytype-check --discipline affine # ACCEPT (drop ok: 0 <= 1)
echo '(lam 1 bool tt)' | anytype-check --discipline exact # REJECT (0 /= 1)
```
Pick the algebra, get the discipline — now code, not prose.
## Verification
- `just test`: 19/19 golden cases + 8/8 seam cases + 4/4 zig tests —
green locally (Idris2 0.7.0, Zig 0.16.0).
- `just proof-check-idris2`: 16 gated modules pass, 5 quarantined still
fail as recorded, all 21 `.idr` files accounted for.
- Every gate was **watched failing** (prover off PATH, sabotaged law
proof, flipped golden expectation, kernel binary removed) before being
made green.
## Out of scope (recorded in ROADMAP/STATE)
Branching (needs a grade join beyond systemet's stated laws), L3
recursion, L0 lowering, L4/TEA (open in systemet), in-process RefC
linkage, checker soundness proof.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .machine_readable/6a2/STATE.a2ml
+11-10Lines changed: 11 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -6,25 +6,25 @@
6
6
[metadata]
7
7
project = "anytype"
8
8
version = "0.1.0"
9
-
last-updated = "2026-06-28"
9
+
last-updated = "2026-07-21"
10
10
status = "active" # active | paused | archived
11
11
12
12
[project-context]
13
13
name = "anytype"
14
14
purpose = "Reference kernel for systemet (Equality Theory): a parameterised checker whose discipline is the chosen L2 grade algebra. Implementation side of the systemet/anytype split."
0 commit comments