Typed Knowledge over Constructive Institutions: A Proof-Relevant Type Theory for Verified Science
Organizations: The Eigenius Project United States
Abstract
Mathematical proof assistants such as Coq, Agda, and Lean 4 build proof irrelevance into definitional conversion ( for with ), 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 a 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 normalization and makes 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 (), impredicative , inductive families with index-forced subsingleton elimination, and intensional identity types, where definitional equality is untyped joinability under an orthogonal CRS and proof irrelevance is a witnessed axiom (). Second, we unify universe cumulativity, -covariant subtyping, and ontology class inclusions in a coercion-free subsumption judgment whose bidirectional fragments () satisfy subject reduction, compile to unification-free checkers (), and match 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 support , and embed Cooper's Type Theory with Records (TTR) for open-world knowledge graphs. Finally, we prove consistency in Grothendieck universes and mechanize the metatheory in Lean 4 with zero sorry axioms.
Figures & tables
| \frac{\Gamma\;\mathsf{ctx}}{\Gamma\vdash\mathsf{Sort}\,\ell:\mathsf{Sort}\,(\mathsf{succ}\,\ell)}\hskip 8.50012pt\textsc{right={Sort}}\frac{\Gamma\vdash A:\mathsf{Sort}\,\ell_{1}\hskip 8.50012pt\Gamma,x{:}A\vdash B:\mathsf{Sort}\,\ell_{2}}{\Gamma\vdash\Pi x{:}A.\,B:\mathsf{Sort}\,(\mathsf{imax}\,\ell_{1}\,\ell_{2})}\hskip 8.50012pt\textsc{right={\Pi-F}}\\ \frac{\Gamma,x{:}A\vdash b:B}{\Gamma\vdash\lambda x{:}A.\,b:\Pi x{:}A.\,B}\hskip 8.50012pt\textsc{right={\Pi-I}}\frac{\Gamma\vdash f:\Pi x{:}A.\,B\hskip 8.50012pt\Gamma\vdash a:A}{\Gamma\vdash f\,a:B[a/x]}\hskip 8.50012pt\textsc{right={\Pi-E}}\\ \frac{\Gamma\vdash A:\mathsf{Sort}\,\ell_{1}\hskip 8.50012pt\Gamma,x{:}A\vdash B:\mathsf{Sort}\,\ell_{2}}{\Gamma\vdash\Sigma x{:}A.\,B:\mathsf{Sort}\,(\mathsf{max}\,\ell_{1}\,\ell_{2})}\hskip 8.50012pt\textsc{right={\Sigma-F}}\frac{\Gamma\vdash a:A\hskip 8.50012pt\Gamma\vdash b:B[a/x]\hskip 8.50012pt\Gamma,x{:}A\vdash B:\mathsf{Sort}\,\ell}{\Gamma\vdash\langle a,b\rangle:\Sigma x{:}A.\,B}\hskip 8.50012pt\textsc{right={\Sigma-I}}\\ \frac{\Gamma\vdash A:\mathsf{Sort}\,\ell\hskip 8.50012pt\Gamma\vdash a:A\hskip 8.50012pt\Gamma\vdash b:A}{\Gamma\vdash\mathsf{Id}\,A\,a\,b:\mathsf{Prop}}\hskip 8.50012pt\textsc{right={Id-F}}\frac{\Gamma\vdash a:A}{\Gamma\vdash\mathsf{refl}\,a:\mathsf{Id}\,A\,a\,a}\hskip 8.50012pt\textsc{right={Id-I}}\\ \frac{\Gamma\vdash a:A\hskip 8.50012pt\Gamma\vdash b:A\hskip 8.50012pt\Gamma\vdash p:\mathsf{Id}\,A\,a\,b\hskip 8.50012pt\Gamma\vdash C:\Pi y{:}A.\,\mathsf{Id}\,A\,a\,y\to\mathsf{Sort}\,\ell^{\prime}\hskip 8.50012pt\Gamma\vdash d:C\,a\,(\mathsf{refl}\,a)}{\Gamma\vdash\mathsf{J}\,a\,C\,d\,b\,p:C\,b\,p}\hskip 8.50012pt\textsc{right={Id-E}}\\ \frac{\Gamma\vdash a:A\hskip 8.50012pt\Gamma\vdash B:\mathsf{Sort}\,\ell\hskip 8.50012ptA\equiv B}{\Gamma\vdash a:B}\hskip 8.50012pt\textsc{right={Conv}}\frac{\Gamma\vdash a:A\hskip 8.50012pt\Gamma\vdash B:\mathsf{Sort}\,\ell\hskip 8.50012pt\Gamma\vdash A\preceq B}{\Gamma\vdash a:B}\hskip 8.50012pt\textsc{right={Sub}} |
| \frac{}{(\lambda x{:}A.\,b)\,a\triangleright b[a/x]}\hskip 8.50012pt\textsc{right={\Pi\beta}}\frac{}{\mathsf{fst}\,\langle a,b\rangle\triangleright a}\hskip 8.50012pt\textsc{right={\Sigma\beta_{1}}}\frac{}{\mathsf{snd}\,\langle a,b\rangle\triangleright b}\hskip 8.50012pt\textsc{right={\Sigma\beta_{2}}}\\ \frac{}{(a:A)\triangleright a}\hskip 8.50012pt\textsc{right={Ann-\triangleright}}\frac{(\mathsf{def}\ c.\{\bar{u}\}:A:=t)\in\mathcal{E}\text{ transparent}}{c.\{\bar{\ell}\}\triangleright t[\bar{\ell}/\bar{u}]}\hskip 8.50012pt\textsc{right={\delta}}\\ \frac{}{\mathsf{J}\,a\,C\,d\,b\,(\mathsf{refl}\,a^{\prime})\triangleright d}\hskip 8.50012pt\textsc{right={Id-\iota}}\\ \frac{c_{k}\text{ is the }k\text{-th constructor of }D\text{ in }\mathcal{E}}{\mathsf{rec}_{D}.\{\bar{\ell},\ell^{\prime}\}\,\bar{p}\,C\,\bar{f}\,\bar{\imath}\,(c_{k}.\{\bar{\ell}^{\prime}\}\,\bar{p}^{\prime}\,\bar{a})\\ \triangleright\;f_{k}\,\bar{a}^{*}\,\bigl(\lambda\Theta_{j}{:}..\{\,\}{\mathsf{rec}_{D}}{\bar{\ell},\ell^{\prime}}\,\bar{p}\,C\,\bar{f}\,(\bar{s}_{j}[\bar{a}^{*}/\bar{y}])\,(a_{j}\,\overline{\Theta_{j}})\bigr)_{j\in R_{k}}}\hskip 8.50012pt\textsc{right={\iota}} |
| \frac{A\equiv B}{\Gamma\vdash A\preceq B}\hskip 8.50012pt\textsc{right={S-Conv}}\frac{\Gamma\vdash A\preceq B\hskip 8.50012pt\Gamma\vdash B\preceq C}{\Gamma\vdash A\preceq C}\hskip 8.50012pt\textsc{right={S-Trans}}\frac{\Gamma\;\mathsf{ctx}\hskip 8.50012ptm\preceq_{\mathrm{lvl}}n}{\Gamma\vdash\mathsf{Sort}\,m\preceq\mathsf{Sort}\,n}\hskip 8.50012pt\textsc{right={S-Cum}}\\ \frac{\Gamma\vdash A_{1}:\mathsf{Sort}\,\ell_{1}\hskip 8.50012pt\Gamma\vdash A_{2}:\mathsf{Sort}\,\ell_{2}\hskip 8.50012ptA_{1}\equiv A_{2}\hskip 8.50012pt\Gamma,x{:}A_{2}\vdash B_{1}\preceq B_{2}}{\Gamma\vdash\Pi x{:}A_{1}.\,B_{1}\preceq\Pi x{:}A_{2}.\,B_{2}}\hskip 8.50012pt\textsc{right={S-\Pi}}\\ \frac{\Gamma\;\mathsf{ctx}\hskip 8.50012ptC\sqsubseteq^{*}D}{\Gamma\vdash C\preceq D}\hskip 8.50012pt\textsc{right={Class-Sub}}\frac{\Gamma\;\mathsf{ctx}\hskip 8.50012ptC\in\mathcal{C}_{\mathcal{G}}}{\Gamma\vdash C\preceq\mathsf{Entity}}\hskip 8.50012pt\textsc{right={Class-Ent}}\frac{\mathsf{dom}(R^{\prime})\subseteq\mathsf{dom}(R)\hskip 8.50012pt\Gamma,\mathsf{tel}(R)\vdash A_{\ell}\preceq A^{\prime}_{\ell}\ (\forall\ell\in\mathsf{dom}(R^{\prime}))\hskip 8.50012ptw\leq w^{\prime}}{\Gamma\vdash R\preceq R^{\prime}}\hskip 8.50012pt\textsc{right={Rec-Sub}} |
| \frac{(x{:}A)\in\Gamma}{\Gamma\vdash x\Rightarrow A}\hskip 8.50012pt\textsc{right={Inf-Var}}\frac{}{\Gamma\vdash\mathsf{Sort}\,\ell\Rightarrow\mathsf{Sort}\,(\mathsf{succ}\,\ell)}\hskip 8.50012pt\textsc{right={Inf-Sort}}\frac{\Gamma\vdash A\Rightarrow_{\mathsf{s}}\ell\hskip 8.50012pt\Gamma\vdash a\Leftarrow A}{\Gamma\vdash(a:A)\Rightarrow A}\hskip 8.50012pt\textsc{right={Inf-Ann}}\\ \frac{\Gamma\vdash A\Rightarrow_{\mathsf{s}}\ell_{1}\hskip 8.50012pt\Gamma,x{:}A\vdash B\Rightarrow_{\mathsf{s}}\ell_{2}}{\Gamma\vdash\Pi x{:}A.\,B\Rightarrow\mathsf{Sort}\,(\mathsf{imax}\,\ell_{1}\,\ell_{2})}\hskip 8.50012pt\textsc{right={Inf-\Pi}}\frac{\Gamma\vdash A\Rightarrow_{\mathsf{s}}\ell_{1}\hskip 8.50012pt\Gamma,x{:}A\vdash b\Rightarrow B}{\Gamma\vdash\lambda x{:}A.\,b\Rightarrow\Pi x{:}A.\,B}\hskip 8.50012pt\textsc{right={Inf-Lam}}\\ \frac{C\equiv_{K}\Pi x{:}A^{\prime}.\,B\hskip 8.50012pt\Gamma\vdash A\Rightarrow_{\mathsf{s}}\ell\hskip 8.50012ptA\equiv_{K}A^{\prime}\hskip 8.50012pt\Gamma,x{:}A\vdash b\Leftarrow B}{\Gamma\vdash\lambda x{:}A.\,b\Leftarrow C}\hskip 8.50012pt\textsc{right={Chk-Lam}}\frac{\Gamma\vdash f\Rightarrow C\hskip 8.50012ptC\equiv_{K}\Pi x{:}A.\,B\hskip 8.50012pt\Gamma\vdash a\Leftarrow A}{\Gamma\vdash f\,a\Rightarrow B[(a:A)/x]}\hskip 8.50012pt\textsc{right={Inf-App}}\\ \frac{C\equiv_{K}\Sigma x{:}A.\,B\hskip 8.50012pt\Gamma\vdash a\Leftarrow A\hskip 8.50012pt\Gamma\vdash b\Leftarrow B[(a:A)/x]}{\Gamma\vdash\langle a,b\rangle\Leftarrow C}\hskip 8.50012pt\textsc{right={Chk-Pair}}\frac{\Gamma\vdash p\Rightarrow C\hskip 8.50012ptC\equiv_{K}\Sigma x{:}A.\,B}{\Gamma\vdash\mathsf{fst}\,p\Rightarrow A}\hskip 8.50012pt\textsc{right={Inf-Fst}}\frac{\Gamma\vdash p\Rightarrow C\hskip 8.50012ptC\equiv_{K}\Sigma x{:}A.\,B}{\Gamma\vdash\mathsf{snd}\,p\Rightarrow B[\mathsf{fst}\,p/x]}\hskip 8.50012pt\textsc{right={Inf-Snd}}\\ \frac{C\equiv_{K}\mathsf{Id}\,A\,x\,y\hskip 8.50012pt\Gamma\vdash a\Leftarrow A\hskip 8.50012ptx\equiv_{K}a\equiv_{K}y}{\Gamma\vdash\mathsf{refl}\,a\Leftarrow C}\hskip 8.50012pt\textsc{right={Chk-Refl}}\frac{\Gamma\vdash a\Rightarrow A\hskip 8.50012pt\Gamma\vdash A\preceq_{K}B}{\Gamma\vdash a\Leftarrow B}\hskip 8.50012pt\textsc{right={Chk-Sub}} |
| Aspect | Coquand’s Unit ( Coquand, 2026 ) | Eigenius Kernel ( ) |
|---|---|---|
| TCB & data | Explicit bidir. terms, recursors; no unification or tactics | Explicit bidir. certificates, ; no unification or tactics |
| -unfolding | Compare shared head args first; unfold newer def (no heuristics) | Confluence-invariant transparent def s; sealed opaque def s |
| -equality | Untyped WHNF on unannotated and pairs | Omitted from (annotated , domain graphs, untyped NbE ) |
| Universes | Cumulative predicative (level exprs.) | Isolated impredicative + ; cumulative |
| Subsumption | Universe cumulativity | Cumulativity, -codomains, ontology classes & TTR records |
| Modularity | Automath-style parameterized declaration segments | Signature morphisms + cross-logic comorphisms (§ 4.1 ) |
| Policy | Cat. | Action of on | Warrant |
|---|---|---|---|
| Adopt | Maps to target axiom in | Declared | |
| Discharge | Substitutes a supplied target proof for each ( ) | Inherited from | |
| Relativize | -abstracts hypotheses: in | Verified ( ) |
| \frac{\Gamma,\ell_{1}{:}A_{1},\ldots,\ell_{i-1}{:}A_{i-1}\vdash A_{i}:\mathsf{Sort}\,u_{i}\ (1\leq i\leq n)\hskip 8.50012ptu_{i}\leq w}{\Gamma\vdash\left[\,\ell_{1}:A_{1},\ldots,\ell_{n}:A_{n}\,\right]:\mathsf{Sort}\,(w+1)}\hskip 8.50012pt\textsc{right={Rec-F}}\\ \frac{\mathsf{dom}(R)\subseteq K\hskip 8.50012pt\Gamma\vdash a_{\ell}:A_{\ell}[a_{\ell^{\prime}}/\ell^{\prime}]\ (\ell\in\mathsf{dom}(R))\hskip 8.50012pt\Gamma\vdash a_{k}:B_{k}\;\;\Gamma\vdash B_{k}:\mathsf{Sort}\,w_{k}\;\;w_{k}\leq w\ (k\in K\setminus\mathsf{dom}(R))}{\Gamma\vdash\left\{\,k=a_{k}\,\right\}_{k\in K}:R}\hskip 8.50012pt\textsc{right={Rec-I}}\\ \frac{\Gamma\vdash t:R\hskip 8.50012pt\ell\in\mathsf{dom}(R)}{\Gamma\vdash t.\ell:A_{\ell}[t.\ell^{\prime}/\ell^{\prime}]_{\ell^{\prime}\prec^{+}\ell}}\hskip 8.50012pt\textsc{right={Rec-E}}\frac{k\in K}{\left\{\,k=a_{k}\,\right\}_{k\in K}.k\triangleright a_{k}}\hskip 8.50012pt\textsc{right={Rec-\beta}}\\ \frac{\Gamma\vdash a:T}{\Gamma\vdash a:\mathsf{Sing}_{a}}\hskip 8.50012pt\textsc{right={Sing-I}}\frac{\Gamma\vdash a:T\hskip 8.50012pt\Gamma\vdash T\preceq U}{\Gamma\vdash\mathsf{Sing}_{a}\preceq U}\hskip 8.50012pt\textsc{right={Sing-Sub}}\frac{\Gamma\vdash T_{1},T_{2}:\mathsf{Sort}\,(u+1)}{\Gamma\vdash T_{i}\preceq T_{1}\vee T_{2}}\hskip 8.50012pt\textsc{right={Join-I{}_{i}}} |
| Sec. | EigeniusTheory/ | Key Mechanized Modules & Theorems |
|---|---|---|
| § 2 | TypeTheory/ | Level ( CumLe ), Confluence ( confluent ), DefEq ( pi_inj , ne_of_head_ne ), Inductive ( forcedIndex ), Irrel , Inconsistency |
| § 3 | TypeTheory/ , Checking/ | Bidirectional ( Inf.sound ), AnnotatedReduction , Completeness ( HasType.translate ), KSorts ( sortsMotive ), Conversion ( ConvRun.correct ), NbE ( Nbe.decides ), Procedure ( Run.correct ) |
| § 4.1 | Institutions/ | ProofCalculus , Kernel ( KCalc , equiv_iff ), KernelPolicies , Models ( toInstitution ) |
| § 4.2 | Justification/ | Evidence ( jb_iff_mem_evid ), Support ( supp_sum_of_notMem , hv_minimals ), Conservativity ( HasType.conservative ) |
| § 4.3 | KnowledgeGraphs/ | Canonical ( canon_congr ), Graph ( rsub_RC_of_anc , gfp_eq_iterate_of_finite ), Propositions |
| § 5 | TypeTheory/S* | SSet ( IsGrothendieck ), SModel , SConsistency ( consistency_of_model ), SEnvKG , SUniverses ( consistency_false_univ ) |