Value
Values are the semantic domain produced by evaluation. They use de Bruijn levels (counting outward from the top of the context), not indices, which makes weakening trivial.
Spec reference: kernel-spec.md §3.
Closures
mkClosure : Env → Tm → Closure — defunctionalized closure.
No Nix lambdas in the TCB; a closure is { env, body } where
body is a kernel Tm evaluated by eval.instantiate.
Value Constructors
Each v* constructor mirrors a term constructor:
vLam,vPi— function values/types (carry name, domain, closure)vSigma,vPair— pair types/valuesvNat,vZero,vSucc— natural number valuesvBool,vTrue,vFalse— boolean valuesvList,vNil,vCons— list valuesvUnit,vTt— unitvVoid— empty typevSum,vInl,vInr— sum valuesvEq,vRefl— identity valuesvU— universe valuesvString,vInt,vFloat,vAttrs,vPath,vFunction,vAny— primitive typesvStringLit,vIntLit,vFloatLit,vAttrsLit,vPathLit,vFnLit,vAnyLit— primitive literals
Neutrals
vNe : Level → Spine → Val — a stuck computation: a variable
(identified by de Bruijn level) applied to a spine of eliminators.
freshVar : Depth → Val — neutral with empty spine at the given depth.
Used during type-checking to introduce fresh variables under binders.
Elimination Frames (Spine Entries)
eApp,eFst,eSnd— function/pair eliminatorseNatElim,eBoolElim,eListElim,eAbsurd,eSumElim,eJ— inductive eliminators