Typed Knowledge over Constructive Institutions: A Proof-Relevant Type Theory for Verified Science
Hans-Martin Will
cs.LO
Nov 11, 2026 · v1
cs.AI cs.CL
TL;DR
Mechanizes the metatheory of the Eigenius dependent type theory in Lean 4 ( 23,000 lines, 38 files, no sorry), including consistency for finite universe bounds.
Abstract
Mathematical proof assistants such as Coq, Agda, and Lean 4 build proof irrelevance into definitional conversion ($p \equiv q$ for $p, q : P$ with $P : Prop$), erasing which derivation established a theorem. While natural for mathematics over fixed axioms, judgmental proof irrelevance is incompatible with verified scientific stores, which must inspect and compare independent derivations of the same claim to assess consilience and compute counterfactual retractions when an assay, reagent, or model is invalidated. Moreover, combining definitional proof irrelevance with subsingleton elimination breaks strong normalization and renders algorithmic conversion non-transitive. We present the type-theoretic and institutional foundations of Eigenius, a verified knowledge substrate for science. First, we formulate a dependent kernel with cumulative universes ($Prop, Set, Type_k$), impredicative $Prop$, inductive families with index-forced subsingleton elimination, and intensional identity types, where definitional equality $\equiv$ is untyped joinability under an orthogonal CRS and proof irrelevance is a witnessed propositional axiom ($irrel : ΠP{:}Prop.\,Πp,q{:}P.\,Id\,P\,p\,q$). Second, we unify universe cumulativity, codomain-covariant $Π$-subtyping, and ontology class inclusions in a coercion-free subsumption judgment whose bidirectional fragments ($\mathcal{K}_0, \mathcal{K}_1$) satisfy subject reduction and are sound and complete for declarative typing. Third, we organize external verifiers into a three-level institutional hierarchy with explicit axiom policies (Adopt, Discharge, Relativize), internalize a justification logic with Why-provenance semiring support $supp(j,P)$, and embed Cooper's Type Theory with Records (TTR) to type open-world knowledge graphs. Finally, we prove consistency in Grothendieck universes and mechanize the metatheory in Lean 4 with zero sorry axioms.
Problem
Proof assistants such as Coq, Agda, and Lean make proof irrelevance definitional, which erases which derivation established a claim. Verified scientific knowledge stores need to compare independent derivations and retract conclusions when evidence is invalidated. Definitional proof irrelevance combined with subsingleton elimination also breaks strong normalization and makes algorithmic conversion non-transitive.
Approach
The authors define the Eigenius kernel, which has cumulative universes, impredicative Prop, inductive families, and intensional identity types. In this kernel, definitional equality is untyped joinability under an orthogonal combinatory reduction system, and proof irrelevance is a witnessed propositional axiom. A unified coercion-free subsumption judgment covers universe cumulativity, Pi-subtyping, and ontology class inclusions, with bidirectional fragments. External verifiers are organized into a three-level institutional hierarchy, and the kernel embeds a justification logic and Type Theory with Records. Consistency is proved via a stratified set-theoretic model in Grothendieck universes, and the metatheory is mechanized in Lean 4.
Results
The bidirectional fragments satisfy subject reduction and are sound and complete for declarative typing. Consistency holds in Grothendieck universes and is discharged unconditionally in Lean 4 for finite universe bounds. The Lean development is about 23,000 lines across 38 files with zero sorry.