This file is the fast orientation for a new contributor, reviewer, or anyone who just cloned the repo and wants to know what they are looking at before reading the full README.
my-lang is a multi-dialect programming language designed for
safety-critical and AI-adjacent applications. Its central concern is
resource accountability: variables, effects, and data flows are
tracked at compile time using Quantitative Type Theory (QTT) — a
semiring-based discipline that can express "this value is used exactly
once (linear), at most once (affine), or arbitrarily (unrestricted)."
The my-lang umbrella covers four dialects (solo, duet, ensemble,
me) that share a QTT semantic core but differ in concurrency model and
surface syntax. Formal verification — paper proofs plus a mechanised
Coq + Idris2 solo-core — is a first-class deliverable, not an
afterthought.
Both my-lang and
affinescript are
flagship language experiments in the same estate. They are siblings:
-
affinescriptis the more mature implementation (~80 OCaml modules, ~20 backends, borrow checker, LSP). Its mechanised solo-core (Idris2 QTT semiring, progress/preservation as typed holes) sets the proof maturity target. -
my-langhas broader paper coverage (~6.3 k lines, four dialects) but was, until recently, thinner on mechanisation.
The Alignment Plan documents the gap and the phased roadmap to close it. The two repos share design intent without being a fork; improvements to one inform the other.
my-lang integrates the
echo-types Agda
library. An echo type models the third case between a fully
reversible map (no information lost) and total erasure (information
gone, no record kept):
Echo<A => B>
Read as: "a proof-relevant residue of some collapse from A to `B`"
— the type of evidence that something was lost but not annihilated.
Concretely, the type-checker tracks a two-point mode poset:
-
Linear— the full fiber witness is retained; distinctions preserved. -
Affine— the collapsed residue only; distinctions weakened away.
A Linear echo may always be supplied where an Affine one is
expected (weakening), but never the reverse (no section). This is the
formal content of EchoLinear.agda’s `weaken / no-section-weaken
theorems, mirrored in five unit tests in
crates/my-lang/src/types.rs.
The claim boundary is narrow and precise:
Echo is a loss-graded reindexing modality over a thin poset. It is NOT a graded comonad, adjunction, universal property, or free construction. (Retraction R-2026-05-18 from the upstream
echo-typeslibrary.)
For full design rationale see docs/design/echo-types-integration.md.
| Path | What it is |
|---|---|
|
Rust compiler crates. |
|
Per-dialect surface syntax. |
|
All formal verification assets. See the Proof Status Registry for what is and is not currently proved. |
|
Coq mechanisation: |
|
Idris2 twin: same five modules plus |
|
Architecture Decision Records and integration design notes. |
|
Exploratory forward-looking research code (outside the Cargo workspace; not shipped). |
|
Mustfile / Dustfile invariant and recovery contracts for |
|
Machine-readable project metadata ( |
my-lang uses a statements-first approach:
-
State the theorem as a named artefact before writing the proof.
-
On the Coq track:
Definition Progress : Prop := …— a named proposition, not anAdmittedtheorem. A barePropasserts nothing and adds nothing to the trusted base. -
On the Idris2 track:
?todo_progress— a typed hole, not a postulate. -
Discharge with
Theorem progress : Progress. Proof. … Qed.when the proof is complete (Phase F1.3).
No proof hole is ever described as "proved" in
proofs/STATUS.md. That file is the
ground truth.
-
Read
proofs/STATUS.md— understand what is actually proved vs stated. -
Read
proofs/ALIGNMENT-PLAN.md— understand the gap vsaffinescriptand which phase addresses it. -
Read
proofs/verification/coq/solo-core/Quantity.v— the fully proved QTT semiring; the shortest complete formal artefact. -
Read
crates/my-lang/src/types.rs— the Rust type checker; theecho_testsmodule mirrors the Agda theorems directly. -
Read
docs/design/echo-types-integration.md— design decisions for the echo type integration.
Hypatia is the estate’s neurosymbolic governance scanner
(hyperpolymath/standards). It runs on every PR and checks for:
-
Banned languages (no TypeScript, Python, Go, Makefile, etc.)
-
Security anti-patterns (unwrapped errors, hardcoded secrets)
-
Trusted-base pollution (
Admitted/Axiomin Coq files) -
Licence consistency (SPDX headers on all files)
Exemptions live in .hypatia-ignore with inline
rationale. The .hypatia-baseline.json
file is an intentionally empty array ([]) — all scanner findings have
been resolved at source or exempted with documented rationale.
The estate enforces strict language restrictions (see
.claude/CLAUDE.md):
-
Allowed: Rust, Idris2, OCaml (AffineScript compiler), Coq, Agda, ReScript, Deno, Gleam, Nickel, Guile Scheme, Julia, Ada.
-
Banned: TypeScript (use ReScript), Node/npm/bun (use Deno), Go (use Rust), Python (use Julia/Rust/ReScript), Kotlin/Swift/Flutter (use Tauri 2.0+/Dioxus).
All new source files require an SPDX licence header.