Skip to content
hotdocxPublic

Repository files navigation

endash — Direct Functorial Type Theory Prover, Standard Library, & Three-Volume Monograph Series

Read the Monographs, Formal Type Theory, Research Paper, & Overview:

npm Packages:

  • @hotdocx/endash-kernel — Standalone Glued-NbE proof verifier, .en parser/elaborator, tactic goal inspector, LCF-certified BigInt CAS, CLI (endash), STDIO MCP server (endash-mcp), < 190 KiB gzipped browser engine, and TypeScript .d.ts SDK interfaces (0 runtime dependencies).
  • @hotdocx/endash-stdlib — Plain-source .en (68 files) & .ts (37 files) standard/mathematical libraries (7,721 verified 0-axiom declarations), zero-trust LCF snapshots (arithmetic.json, walking-end.json, core-stdlib.json, stdlib-en-ensnaps.json), and Proof-Graph & Tag Atlas (endash-graph-data.json).

Overview

endash is a standalone proof assistant, Lean 4-compatible .en surface language, and LCF-certified computer-algebra system for Functorial Type Theory — uniting classical inductive mathematics, Homotopy Type Theory (∞-groupoids, univalence, higher inductive types), directed (∞, 1)- and Gray-categorical mathematics, Grothendieck topoi, synthetic Higher Algebra, and arithmetic algebraic geometry with zero postulated axioms across 7,721 machine-checked declarations.

Key Highlights

  1. Six-Safeguard Direct Glued-NbE Architecture:
    • StrictCat(u) vs. GrayCat(u) universe stratification (Cat_lax : GrayCat, preventing middle-four interchange collapse);
    • Canonical eventually-constant bitstream dualities 𝒟 ≅ ℤ₂^* × ℤ₂ ({ diff: bigint, tail: boolean }, closed under homShift and familyBaseShift);
    • Bunched modal contexts (, Cartesian product bunches vs. ; ordered Gray/dependent telescopes);
    • Generic functorial neutral variables 𝐱 :^fun A for O(1)-step ω-categorical functor conversion with untruncated recursive .atHom towers;
    • Substitution-stable Kosta Došen composition spines, Q-free coinductive ω-transfors (k ≥ 1), and 2-periodic polarized Σ±(K, E);
    • Topological-height Glued NbE (v-glued / v-glued-grpd) + BigInt v-nat-lit numerals + @[simpl_nomatch] / #probe controlled unfolding.
  2. Full Plain-Source Mathematical Libraries (0 Postulated Axioms):
    • stdlib/en/ — 58 .en library modules across CategoryTheory/, Combinatorics/, GroupTheory/, HigherAlgebra/, and AlgebraicGeometry/, plus 10 flagship *Showcase.en files (6,125 verified 0-axiom declarations, including the Abelian Heart Theorem HA 1.2.1.11, Grothendieck Fibrations & Straightening, Barr–Beck, Six Functors & Verdier Duality, Pic(ℙ¹) ≅ ℤ, Grothendieck–Riemann–Roch, sharp genus-1 Hasse curve RH t² ≤ 4q, the 2611.00789v1 short sign-only Deligne Frobenius Weil bound modulo pre-1993 geometry, choice-free spherical Behrend 3-AP-free sets, Hilbert–Schmidt dispersion + Wolsey greedy, and the 4-status de-seamed Dirichlet GRH spine);
    • stdlib/ts/ — 37 plain .ts files implementing all 22 built-in native standard-library modules (1,596 verified 0-axiom declarations, typed against ./prebuilt/types/sdk.d.ts).
  3. 14 LCF-Certified BigInt CAS Tactics:
    • cas_matrix_eq, cas_snf, cas_homology, cas_cech_p1, cas_ext, cas_ext_mul, cas_spectral_seq, cas_bar_tor, cas_hochschild, cas_cotangent, cas_group, cas_hilbert, cas_derham, cas_cyclic, cas_lefschetz, cas_theta, cas_stepanov, cas_smith, cas_resultant, and cas_gauss — every witness reified to explicit Core terms and verified with 0 axioms.

Documentation & Agent Onboarding Map

  • FORMAL_TYPE_THEORY.md — Self-contained formal type-theory presentation (for category theorists & type theorists): Gentzen inference rules, bunched modal contexts, all 7 judgment forms, derivation-indexed lift_x(e), coinductive ω-transfors (k ≥ 1), Q-free 2-periodic Σ±, HIT rules, metatheoretic boundaries, and worked derivations.
  • LANGUAGE_AND_TOOLING_GUIDE.md — Start here to write .en proofs or integrate endash: .en syntax, declarations, attributes, tactics, CLI (endash), MCP Server (endash-mcp), and JS/TS SDK (@hotdocx/endash-kernel & @hotdocx/endash-stdlib).
  • SPECIFICATION.md — Concise formal & algorithmic summary of universes, bitstream duality, bunched modal contexts, coinductive ω-transfors, Došen spines, HITs, univalence, Glued NbE, and LCF CAS verification.
  • AGENTS.md — Dedicated quick-reference SOP for AI/LLM coding & theorem-proving agents (Claude Code, Codex, Antigravity, Cursor).
  • RESEARCH_PAPER.md — Self-contained research paper presenting the direct Glued-NbE calculus, Q-free Σ±, worked categorical/topos derivations, LCF CAS synthesis, and three-volume results (PDF).
  • OVERVIEW_ARTICLE.md — Concise executive overview outline with independently verifiable public SHA-256 artifact & library pins (PDF).
  • books/series.json — Three-volume monograph sources, evidence.json registers, and 10-source literature concordances (lurie-ha-map.json, stacks-ega-map.json, rh-spine-map.json).
  • formalization.yaml — Architectural blueprint & module taxonomy.

Quickstart

1. Offline Browser Playground & Monograph Reader (Zero Install)

  • Open playground/index.html directly in any modern browser to edit .en files, inspect live line:col tactic goal states, certify ℙ¹ Čech cohomology in-browser, and browse the Proof-Graph & Tag Atlas.
  • Open prebuilt/books/index.html for the interactive Three-Volume Monograph & 3-Artefact Blueprint Portal.

2. Standalone CLI & MCP Server (from this repository, Node >= 22.13)

# Check any .en module with strict 0-axiom verification
node prebuilt/endash-cli.cjs check stdlib/en/HigherAlgebraShowcase.en --strict-axioms

# Inspect live tactic goals at 1-based line:col
node prebuilt/endash-cli.cjs goals stdlib/en/HigherAlgebraShowcase.en 18:3

# Query 10-namespace literature tags (@[ha], @[stacks], @[ega], @[sga], @[weil], @[rh], ...)
node prebuilt/endash-cli.cjs tags Deligne

# Search across all 3 monograph volumes & concordances
node prebuilt/endash-cli.cjs book query heartToAbelianCat

# Verify the entire 3-volume monograph series (118 sections, 376 claims, 128 literate blocks)
node prebuilt/endash-cli.cjs book check books

# Run public distribution smoke tests
npm test

# Launch the JSON-RPC 2.0 STDIO MCP server for AI agents / IDEs
node prebuilt/endash-mcp.cjs --workspace .

3. Via npm (@hotdocx/endash-kernel + @hotdocx/endash-stdlib)

npm install @hotdocx/endash-kernel @hotdocx/endash-stdlib
npx endash check node_modules/@hotdocx/endash-stdlib/en/FunctorialShowcase.en --strict-axioms
import { readFileSync } from 'node:fs';
import { createRequire } from 'node:module';
import { createVerifier } from '@hotdocx/endash-kernel';

const require = createRequire(import.meta.url);
const stdlibJson = readFileSync(require.resolve('@hotdocx/endash-stdlib/walking-end.json'), 'utf8');
const verify = createVerifier(stdlibJson);

const report = verify(
  'axiom twoLoops : WalkingEnd.encode (WalkingEnd.loop ∘ WalkingEnd.loop) = 2',
  'theorem twoLoops : WalkingEnd.encode (WalkingEnd.loop ∘ WalkingEnd.loop) = 2 := rfl',
);
console.log(report.ok, report.targetTheoremsVerified); // true, ['twoLoops']

License

Software, .en/.ts libraries, and compiled runtime artifacts are licensed under the ISC License. The three-volume monograph prose under books/ is licensed under CC-BY-SA-3.0.