λεξις — When the Diagram Is the Code

A formal language designed for the era of human–AI collaborative computation. Ten geometric primitives. Five ontological levels. One unified notation where drawing and programming are the same act.

The Problem

Software systems are designed in one notation (diagrams, whiteboards, flowcharts) and implemented in another (code). This translation gap is where intent is lost, where AI assistants hallucinate, and where formal verification becomes impractical.

λεξις collapses the gap. A λεξις diagram is the program. There is no translation step — only increasing levels of formalization applied to the same underlying structure.

Six Design Principles

  1. Diagram = Code. The visual representation and the executable specification are the same artifact.
  2. Geometric universality. Primitives are geometric symbols — not programming-language keywords — so they are language-agnostic and AI-legible.
  3. Incremental formality. A system can be sketched at L1 and progressively refined to L5 without changing notation.
  4. AI co-authorship. The language is designed to be generated, reviewed, and critiqued by AI assistants — not just humans.
  5. Inline proof obligations. Formal invariants and type constraints live inside the diagram, not in a separate verification tool.
  6. Composability. Any λεξις graph can be embedded inside a Box primitive of another graph, enabling fractal system architecture.

Ten Primitive Atoms

Every λεξις system — no matter how complex — is built from ten geometric primitives. Each primitive has a precise semantic definition and a corresponding visual glyph in Morphē.

Entity

An atomic unit of computation or data.

Arrow

Directed relation between two entities.

Join

Convergence of multiple flows.

Fork

Divergence into parallel paths.

Box

Encapsulated sub-system boundary.

Choice

Conditional branching point.

Store

Persistent state or memory location.

Loop

Recursive or iterative structure.

Proof

Inline formal obligation or invariant.

Void

Terminal state or empty type.

The Ontological Framework

λεξις structures computation across five ontological levels, from informal sketch to formally verified specification:

L1Concept

Free-form nodes and arrows. No semantic constraints.

L2Structure

Typed nodes. Edges carry flow direction.

L3Behavior

State transitions, guards, and temporal ordering.

L4Protocol

Message-passing semantics. Typed channels.

L5Proof

Formal invariants. Inline proof obligations. Decidable verification.

The Paper

The full language design — including formal grammar, ontological framework, proof calculus, and worked examples — is published open-access on Zenodo (CERN).

"λεξις (Lexis): A Language Design for Human–AI Collaborative Computation"
Paolo Tanzi & Claude (AI assistant) · March 2026 · DOI: 10.5281/zenodo.19302004
Read the Paper →