Skip to content

About

Pre-registration and research notebook for a graded multiparty-session type theory combining echo loss-grades and epistemic warrants on partial causal orders. Central artefact: K-CUT, the open conjecture that grading and transport commute with endpoint projection across a consistent frontier. Agda is the intended prover; no checked module yet.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Choreographic Types — Graded Multiparty Session Fusion

A pre-registration and research notebook for a graded multiparty-session and choreographic type theory, combining echo loss-grades and epistemic standpoint-warrants. Agda is the prover: the finite, binary-choice, plain-merge, synchronous fragment is checked under a pinned --safe --without-K gate (see Validation), and PROOF-STATUS ledgers what is and is not proved. The central artefact is the keystone K-CUT — proved for that fragment and open beyond it — the statement that grading and transport commute with projection across a consistent frontier.

Overview

A global choreographic type G is read as a partial causal order. It is projected to local types (endpoint projection), where each edge is graded by:

  • An echo loss-grade (from echo-types): the structured information loss at that interaction.

  • An epistemic standpoint-warrant (from epistemic-types): the evidence required to authorise that interaction.

A cut is a consistent frontier (antichain) across the causal order. Loss is read modally: ∇ contingent (loss may occur) / △ non-contingent (loss is impossible), indexed by an ordinal loss value.

The sole purpose of this repository is to prove or falsify the keystone conjecture K-CUT: that grading and transport commute with projection across a cut.

The keystone (K-CUT)

K-CUT states: grading and transport commute with endpoint projection across a consistent frontier. It splits into two fragments:

K-CUT-LOSS

Grading commutes with projection as an equality. Loss is type-determined: the grade of the global cut, restricted to the endpoint, equals the grade read locally at the endpoint up to the projected cut. Status: PROVEN for the finite binary-choice, plain-merge fragment, parametric in any ResourceAlgebra (src/Choreographic/KCut.agda, kcut-loss), discharged at the Loss, MaxPlus and HWM instances. Uses only ⊕-idempotence and ⊗-left-unit (certified by scripts/minimal-laws.sh). Recursion, full merge and asynchrony remain OPEN. See PROOF-STATUS.adoc.

K-CUT-WARRANT

Warrant transport commutes with projection only as a bound, and only under a SoundWarrant side-condition. Status: PROVEN in bound form for the same fragment (src/Choreographic/Bound.agda): in a Kripke frame whose worlds are consistent cuts and whose accessibility is sameness of local view, every party knows its restricted grade (a SoundWarrant in epistemic-types' own interface, imported) and knows a one-sided bound on the global grade, whose direction depends on where the sequence unit sits in the algebra’s order. The transport component is in too: the local frontier is known at every world (receiving is knowing it was received), party access "q sees at least what p sees" is epistemic-types' Preorder instantiated, and knowledge is monotone along it — a lawful world-indexed AccessibleModality. OPEN beyond the fragment: recursion, full merge, asynchrony, data-dependent warrants. See PROOF-STATUS.adoc.

Note

The single-static-edge base case in echo-types (RoleGraded.choreo-grade-commute) is recovered as the Loss instance on {fin 0, fin 1, inf}: its coarsening order is the converse of the absorption order (src/Choreographic/Base/RoleGraded.agda). It was single-edge because that sub-lattice is not closed under sequence.

Applications

Applications are kept in a separate, explicitly non-normative section so that an algorithm or UI does not get mistaken for a proof of K-CUT. The first case study is a two-thread RapidNJ-style reduction:

The smallest target in that case study is the two-event K-CUT-LOSS commuting square under an Independent₂ witness. The witness must strengthen antichain membership with disjoint read/write footprints, phase safety, and a deterministic tie policy. The application note separates this algorithmic state diamond from the K-CUT equality and records the warrant component as deferred.

What is standard and what is ours

Concept Status Home

Multiparty session / choreographic types

Standard (Honda–Yoshida–Carbone, Montesi, Hirsch–Garg, Bocchi–Yoshida)

src/Choreographic/Global.agda, src/Choreographic/Local.agda, src/Choreographic/Party.agda

Endpoint projection from global to local types

Standard

src/Choreographic/Projection.agda (plain merge, cut projection, Consistent)

Dioid/tropical grading of sessions

Standard (various timed/costed session works)

Imported from resource-algebra at a pinned commit (same kernel); see Dependencies

Echo loss-grades on choreographic edges

Imported from echo-types at a pinned commit

src/Choreographic/Base/EchoAdditive.agda (echo-types' ℕ ∪ {∞} grade packaged as a ResourceAlgebra); base case in src/Choreographic/Base/RoleGraded.agda

Epistemic warrants on choreographic edges

Imported from epistemic-types

SoundWarrant side-condition

Assembly of echo + epistemic grades on partial causal orders

Ours (assembly)

src/Choreographic/ (Global, Projection, KCut, Kripke, Bound, Transport)

K-CUT (grading/transport commutes with projection across a cut)

Ours (conjecture)

src/Choreographic/KCut.agda, src/Choreographic/Bound.agda, src/Choreographic/Transport.agda — PROVEN (fragment); OPEN beyond it

Dependencies, pins and the port-and-reprove pattern

The development imports three siblings of the estate’s Agda kernel, each at one pinned commit fetched by scripts/fetch-siblings.sh (a full SHA, verified after checkout; the gate fails on a mismatch):

  • resource-algebra — the parametric ResourceAlgebra (alternatives ⊕, sequence ⊗, the induced order ≼; dioid, ordered and annihilating layers) and the Loss (min-plus, ℕ ∪ {∞}), MaxPlus (ℕ ∪ {−∞}) and HWM instances. Same kernel: imported, not re-proved.

  • epistemic-types — Warrant / SoundWarrant and Access.Preorder, imported, not imitated (the proof home for the warrant side of K-CUT-WARRANT).

  • echo-types — experimental/echo-additive/Grade.agda, the echo-additive ℕ ∪ {∞} grade. src/Choreographic/Base/EchoAdditive.agda packages it as a ResourceAlgebra from echo-types' own lemmas and proves it agrees with Loss operation for operation, so "min-plus" and "echo-additive" are one checked algebra, not two transcriptions. That module is the only one that needs the Agda standard library (through echo-types) and is checked as its own root, so the keystone stays builtins-only.

The tropical algebra was re-proved in-site, in resource-algebra (Instances/MaxPlus.agda), rather than imported across kernels, following the estate’s port-and-reprove pattern (precedent: typed-wasm/…/Tropical.idr). The named cross-prover bridge obligation — that MaxPlus agrees with tropical-types' Lean 4 instance : CommSemiring Tropical — is resource-algebra’s ledger row M-2 and is OPEN there. This repository inherits it: every MaxPlus discharge (kcut-loss-MaxPlus, kcut-warrant-MaxPlus) carries the Lean theorem as provenance, never as an import. See docs/pre-registration-addendum-2026-10-13.adoc.

The research intent, borrowed-vs-ours ledger and outstanding obligations are preserved in the pre-registration record.

What this is not

  • NOT Gentzen cut-elimination. A cut here is a consistent frontier (antichain) of a causal order, not a proof-theoretic cut.

  • NOT a kernel or engine. Implementation belongs to typell.

  • NOT a subdirectory of echo-types or epistemic-types. It is a standalone repository registered in nextgen-typing.

  • NOT a claim about an upstream RapidNJ parallel implementation. The RapidNJ note is an application-shaped proof target and states its own refinement boundary.

Repository Layout

Path Purpose

src/Choreographic/

The checked development (--safe --without-K, builtins only except src/Choreographic/Base/EchoAdditive.agda); src/Choreographic/All.agda checks the whole core

tests/reject/

Expected rejections: each must fail at its invalid declaration with a type mismatch

tests/minimal-laws/

A deliberately impoverished ResourceAlgebra.Core certifying which laws K-CUT-LOSS uses

scripts/fetch-siblings.sh, scripts/check.sh, scripts/minimal-laws.sh

The proof gate, as run by .github/workflows/proofs.yml

PROOF-STATUS.adoc

The ledger: every claim with PROVEN / TESTED / ASSUMED / DESIGNED / OPEN and the module that discharges it; every cited name is bound to its definition, and the definition’s comment back to the row, by the integrity check

applications/

Application notes and explicitly postulated Agda targets (not proofs)

docs/pre-registration.adoc

Research state, provenance and outstanding proof obligations

docs/actions-policy.adoc

Owner-only Actions policy repair and verification

scripts/check-repository.mjs and tests/

Documentation integrity and regression checks (not proof checking)

Validation

The proof gate is .github/workflows/proofs.yml: a digest-pinned Debian 13 container with agda-bin=2.6.4.3-1+b2 and agda-stdlib=2.1-4 from the distribution, siblings fetched at pinned commits, and every module checked with --safe --without-K --no-libraries --ignore-interfaces --double-check -W error. To run it locally with that Agda (any other version is refused; set AGDA_VERSION to check deliberately with another):

bash scripts/fetch-siblings.sh   # resource-algebra, epistemic-types, echo-types at their pins
bash scripts/check.sh            # core proofs, echo-additive instance, expected rejections
bash scripts/minimal-laws.sh     # which laws K-CUT-LOSS uses

applications/rapidnj-two-thread.agda is not part of the gate: it is a postulated target, not a proof (see PROOF-STATUS.adoc).

The documentation integrity checks are structural only and never evidence that anything is proved. With Node.js 22 or newer:

node scripts/check-repository.mjs
node --test tests/*.test.mjs

Formalisation (fragment, 2026-10-12)

See src/Choreographic/ and PROOF-STATUS.adoc: K-CUT-LOSS and both components of K-CUT-WARRANT are proved for the finite, binary-choice, plain-merge, synchronous fragment, parametric in resource-algebra, and checked by the gate above on every pull request and every push to main since 2026-10-13. The plan below is kept as the record of what was planned.

As planned (2026-10-03)

Canonical definitions, endpoint projection, a parametric resource algebra, and the K-CUT statements must be developed before a prover build can be published. No placeholder source tree is provided to imply otherwise.

Documentation

License

SPDX-License-Identifier: MPL-2.0 — see LICENSE.

About

Pre-registration and research notebook for a graded multiparty-session type theory combining echo loss-grades and epistemic warrants on partial causal orders. Central artefact: K-CUT, the open conjecture that grading and transport commute with endpoint projection across a consistent frontier. Agda is the intended prover; no checked module yet.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages