Skip to main content

Kernel module map

The verum_kernel crate is the trusted infrastructure for Verum's verification machinery. As of the current revision it ships 63 modules. This page is the canonical inventory: every module listed, what it does, which trust layer it sits on, and which audit gate consumes it.

The discipline of an enumerable trust boundary cuts both ways: auditors get a complete map; new contributors learn the codebase faster. There is no implicit trust — every module's role is documented.

For the layered architecture overview see Trusted kernel. For the audit gates that consume these modules see Audit protocol.


1. Trust layer A — the irreducible core

The minimum that must be trusted for soundness:

ModuleLOCRole
proof_checker~786The trusted base (Algorithm A). Minimal CoC checker (6 rules). Bidirectional infer + check.
proof_checker_nbe~713Second algorithmic kernel (Algorithm B). Normalisation-by-Evaluation for differential testing.
kernel_registry::KernelV0KernelThird algorithmic kernel (Algorithm C). Manifest-driven bootstrap verifier — anchors structural type-check, manifest audit-cleanness, meta-soundness footprint, per-rule strict-intrinsic dispatch.
proof_checker_metaUniverse-lift mechanism for meta-mode (Gödel-2nd workaround foundation).
termThe CoreTerm data type — proof-term representation.
ctxType-checking context (de Bruijn-indexed binders).
errorsCheckError / KernelError — the kernel's error surface.
verdictVerificationVerdict + DischargeMethod (ATS-V foundation).

These seven modules are the trusted-base TCB. A reviewer auditing Verum's soundness reads these top-to-bottom; every other module either cites one of these or consumes its output without modifying its trust.


2. Trust layer B — the differential and registry layer

ModuleRole
differentialDifferential-kernel testing harness — runs every certificate through every registered kernel.
differential_fuzzProperty-based mutation fuzzer over the kernel registry (11-variant mutation grammar).
kernel_registryN-kernel registry trait KernelImpl for differential testing.

These modules surface kernel-implementation trust at audit time (verum audit --differential-kernel{,-fuzz}).


3. Trust layer C — the audit registry & meta-soundness

ModuleRole
zfc_self_recognitionThe 7-rule KernelRuleId audit registry + per-rule ZFC + inaccessible decomposition.
reflection_towerMSFS-grounded 4-stage meta-soundness (reflection tower).
reflectionMeta-level reflection primitives (Gödel-coding, term reflection).
godel_codingGödel-numbering for meta-level proof manipulation.
proof_checker_metaUniverse-lift wrapper running the proof_checker with one extra inaccessible.

These modules realise the meta-soundness layer that protects the trusted base from Gödel-2nd-style self-reference.


4. Architectural type system (ATS-V)

ModuleRole
archEight architectural primitives: Capability / Boundary / Composition / Lifecycle / Foundation / Tier / Stratum / Shape.
arch_parse@arch_module(...) named-args → Shape parser.
arch_phasethe architectural-type-checking phase — the architectural type-checking phase wired into the compiler pipeline.
arch_anti_patternThe 32-pattern anti-pattern catalog with stable RFC error codes.
arch_compositionComposition algebra Shape ⊗ Shape.
arch_corpusCross-cog corpus invariants (cycle detection, transitive lifecycle regression).
arch_mtacModal-Temporal Architectural Calculus primitives (Decision / Observer / ModalAssertion / TimePoint / ArchProposition).
arch_counterfactualCounterfactual reasoning engine + metric extraction.
arch_adjunctionAdjunction analyzer for refactoring (4 canonical adjunctions).
arch_yonedaYoneda-equivalence checker per ATS-V spec §20.7.

For the surface documentation see Architecture-as-Types.


5. Verification goals & dispatchers

ModuleRole
verification_goalThe verification goal carrier — pure-value obligations.
separation_logicHeap-aware separation-logic primitives (separation logic).
certCertificate envelope: schema_version + verum_version + metadata + replay payload.
intrinsic_dispatchKernel intrinsic registry dispatch (every kernel_* audit-time function).
inductiveInductive type registration + strict-positivity walker (K-Pos).
inferType inference machinery for the broader kernel surface.

6. Categorical infrastructure

A substantial part of the kernel ships ∞-categorical primitives used by the proof corpora. Each module corresponds to a named mathematical structure:

ModuleMathematical structure
adjoint_functorAdjoint pairs L ⊣ R
cartesian_fibrationCartesian / coCartesian fibrations (Lurie HTT §2.4)
cofibrationCofibration / fibration discipline
factorisationFactorisation systems
grothendieckGrothendieck construction (∫: Cat^op → Cat)
infinity_category(∞,1)-category primitives
infinity_topos(∞,1)-topos primitives
limits_colimitsLimit / colimit dispatchers
pronk_fractionsPronk's bicategory of fractions (1996)
reflective_subcategoryReflective subcategory machinery
truncationn-truncation τ_{≤n} (Lurie HTT 5.5.6)
universe_ascentUniverse hierarchy + the K-Univ kernel rule
whiteheadWhitehead's theorem promotion
yonedaYoneda lemma + the equivalence at L4

These modules cite the published mathematical literature; their content is admitted under @framework(...) markers visible to the framework-axiom audit.


7. Soundness adapters

ModuleRole
axiomCoreTerm::Axiom constructor — the only path from external citation into a kernel-checkable term.
framework_citation@framework(name, "...")FrameworkCitation data layer + manifest collector.
accessibility@accessibility(λ) Diakrisis Axi-4 marker enumeration.
foundation_profileFoundation profiles (ZFC / HoTT / Cubical / Cic / MLTT / Eff / Custom).
foreign_systemExternal system citations (Coq, Lean, Isabelle, the SMT backend).
diakrisis_bridgeThe α/ε bidirectional bridge primitives (Diakrisis 108.T).
eps_muε-μ-style coherence machinery.
depthM-iteration depth witnesses for K-Refine.

8. Codegen-attestation

ModuleRole
codegen_attestationPer-pass codegen kernel-discharge manifest (CompCert-style simulation theorems).

The audit gate verum audit --codegen-attestation walks every codegen pass's per-pass invariant.


9. Tactic + proof infrastructure

ModuleRole
tactic_elaboratorTactic-DSL elaborator: proof { ... } block → CoreTerm.
tactics_industrialIndustrial-strength tactic library (the 56-tactic stdlib's kernel-side dispatch).
proof_treeKernelProofNode — the inference-tree representation.
proof_viewProof-tree presentation (auditor-facing rendering).
mechanisation_roadmapThe HTT / Arnold mechanisation roadmap manifests.

10. Round-trip + cross-format

ModuleRole
round_tripProof-export + re-import round-trip verification (verum audit --round-trip).
cross_format_gateCross-format coverage matrix (which proofs export to which prover).

These modules underwrite the proof-export pipeline's soundness claims.


11. Performance + caching

ModuleRole
normalize_cacheβ-reduction memoisation cache for the trusted-base normaliser.
supportShared utilities (text, formatting, common types).
ordinalOrdinal-arithmetic primitives (used by NuOrdinal and the reflection tower).

12. The library entry point

ModuleRole
libThe crate's lib.rs — re-exports the public API and ships ~837 LOC of integration code (the KERNEL_RULE_NAMES constant, the public-API KernelProofNode re-export, the record_inference helper, etc).

13. Module count summary

Layer A — irreducible core : 7 modules
Layer B — differential / registry : 3 modules
Layer C — meta-soundness : 5 modules
ATS-V : 10 modules
Verification goals / dispatchers : 6 modules
Categorical infrastructure : 14 modules
Soundness adapters : 8 modules
Codegen attestation : 1 module
Tactics / proof tree : 5 modules
Round-trip / cross-format : 2 modules
Performance / caching : 3 modules
Library entry point : 1 module (lib.rs)
─────
63 modules total (~58 KLOC)

The trusted-base subset (Layer A) is < 1500 LOC — the auditor-readable irreducible core. Everything else either cites Layer A or consumes its output.


14. Cross-references