Typed Knowledge over Constructive Institutions: A Proof-Relevant Type Theory for Verified Science

Hans-Martin Will

This paper introduces Eigenius, a new type-theoretic foundation designed specifically for "verified science." While traditional proof assistants like Lean and Coq are built for pure mathematics, Eigenius addresses the unique epistemic requirements of empirical research—namely, the need to track exactly how a claim was proven to handle data retractions and multi-method validation.

TL;DR

Eigenius is a proof-relevant type theory that prevents the "erasure" of scientific evidence, allowing computational kernels to distinguish between different experimental derivations of the same claim. By formalizing scientific provenance through justification logic and constructive institutions, it provides a mechanically verified substrate for building trustworthy, auditable scientific knowledge stores.

What Problem Does This Paper Address?

In pure mathematics, once a theorem is proven, the specific steps of the proof often don't matter to the computer—a truth is a truth. This is called definitional proof irrelevance (Def-PI). If you have two different proofs of the same proposition, modern kernels like Lean 4 treat them as identical ($p \equiv q$).

However, in science, the "how" is everything. If a claim is supported by both a CRISPR screen and an RNAi screen, that "consilience" makes the claim much stronger than if it were just one screen run twice. Under Def-PI, a computer can't tell the difference. Furthermore, if a specific reagent or statistical model is later found to be flawed, a scientific database must be able to "retract" only the specific conclusions that relied on that flawed evidence. If the kernel has erased the distinction between proofs, this kind of surgical audit becomes impossible.

Figure 1: Two independent experimental derivations 𝑝CRISPR, 𝑝RNAi : ΦWRN in the WRN synthetic lethality study [12, 45]. Eigenius keeps 𝑝CRISPR ̸≡𝑝RNAi distinct under conversion while witnessing their propositional equality via irrel.

Methods

The authors develop the Eigenius kernel, which departs from standard provers in several key ways:

  • Proof Relevance by Default: Definitional equality ($\equiv$) is based on untyped orthogonal rewriting. This ensures that different proof terms remain syntactically distinct normal forms.
  • Witnessed Proof Irrelevance: Instead of baking irrelevance into the engine, they provide a global axiom (irrel). This allows users to prove that two derivations are propositionally equal when needed (e.g., for data structures) without losing the underlying provenance.
  • Unified Subsumption: The system uses a single judgment to handle universe cumulativity (e.g., $Set \prec Type$), function subtyping, and ontology class hierarchies (e.g., a "Gene" is a sub-type of "Entity").
  • Constructive Institutions: To handle the "messy" parts of science—like statistical pipelines or external SMT solvers—Eigenius uses a three-level hierarchy of "institutions." This allows external verdicts to be imported into the kernel using explicit policies like Adopt (declare as axiom), Discharge (provide a proof), or Relativize (make the claim conditional on the external tool).
Table 1: The three institutional axiom policies for maps of proof calculi (Φ, 𝛼,𝛾) into the Eigenius kernel K.

Datasets

The paper demonstrates its utility using a real-world oncology case study: the WRN synthetic lethality study (Chan et al., 2019).

  • Experimental Data: The authors formalize derivations using the Project Achilles (CRISPR) and Project DRIVE (shRNA) datasets.
  • Metatheory Verification: The primary "dataset" for evaluation is the EigeniusTheory Lean 4 development, which consists of ~23,000 lines of code across 38 files, formalizing the entire metatheory with zero "sorry" axioms.

Key Insights and Ideas

  • Scientific Epistemics vs. Mathematical Truth: The core "aha" moment is that scientific truth is provisional and dependent on specific evidence chains. A kernel for science must be a "provenance-aware" compiler for arguments.
  • Avoiding the Normalization Trap: By keeping conversion untyped and avoiding Def-PI in the core, Eigenius avoids technical pitfalls (like the failure of strong normalization) that plague other systems trying to mix proof irrelevance with complex recursive predicates.
  • Justification Logic Integration: The system internalizes a "Justification Logic" that allows for $O(n^3)$ provenance queries. This means you can ask the system, "Which results would break if this specific cell line was found to be contaminated?" and get a fast, verified answer.

Key Results

  • Logical Consistency: The authors prove the consistency of the kernel using a stratified set-theoretic model in Grothendieck universes.
  • Mechanized Metatheory: The entire system is implemented and verified in Lean 4. This includes the decidability of type checking and the soundness of the bidirectional typing rules.
  • Bidirectional Typing: The kernel implements a syntax-directed split between synthesis ($\Rightarrow$) and checking ($\Leftarrow$), making the type-checking process algorithmic and predictable.
Figure 5: Bidirectional synthesis (Γ ⊢𝑎⇒𝐴) and checking (Γ ⊢𝑎⇐𝐴) rules for the kernel fragments K0 and K1 (con- stants, Σ-formation, Id-formation, and J-inference omitted).

Limitations and Future Work

  • Front-end Usability: While the kernel is verified, the paper does not present a high-level user interface for bench scientists. Translating natural language scientific claims into this rigorous type theory remains a significant hurdle.
  • Open-World Complexity: Handling coinductive membership in knowledge graphs (where things can refer to each other in cycles) is computationally expensive, though the authors prove it is decidable.
  • Scaling Institutions: Future work involves defining more "comorphisms"—the bridges that allow Eigenius to talk to other specialized logic engines or Bayesian inference tools.

Summary updated

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.
BibTeX
@misc{will2026typed,
  author = {Hans-Martin Will},
  title = {{Typed Knowledge over Constructive Institutions: A Proof-Relevant Type Theory for Verified Science}},
  year = {2026},
  eprint = {2611.15108},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.15108},
}
Figure