Lean Kernel Arena / logos-kernel

Checker "logos-kernel"

Version: 1e6ad5b · 📄 Declaration · 🔗 Source

logos-kernel — the kernel core of LOGOS, a Lean 4 checker in Rust.

  • Expressions live in a maximally shared, hash-consed DAG with de Bruijn indices: structural equality is one integer compare, and every cache is keyed on node identity. The export's own sharing is preserved exactly; nothing is expanded into a tree.
  • Declarations are checked by evaluation into closures: β extends an environment, a binder is crossed by binding a fresh variable, and δ/ι wait in neutral values until conversion or inference asks for a weak head. Types are values too, and closures keep only the variables their body mentions.
  • Conversion is Lean's algorithm: lazy δ by definitional height, proof irrelevance, η, structure η, unit-like types, K, quotients, Nat/String literals, with a complete decision procedure for universe level ≤/≡.
  • Inductive families, nested ones included, are elaborated by the kernel itself; an export's recursors, rules and flags are admitted only if identical to what the kernel derives.
  • The Nat literal fast paths (add … gcd, bitwise, shifts) and String literals are enabled only after the environment's definitions are validated in the manner of lean4lean, against reference terms elaborated by Lean itself.
  • Rejections explain themselves on stderr: which declaration, which rule, which terms.
Soundness (rightfully rejected tests)

80 ✅ 0 ❌ 0 🚫

Completeness (rightfully accepted tests)

138 ✅ 0 ❌ 0 🚫

Corner cases (no outcome prescribed)

30 ✅ 0 🚫

Test Expected Result ⏱️ 🧠
cedar 👍 👍 7.45 s (÷19) 3.5 GB (×2.6)
con-leche 👍 👍 6.31 s (÷18) 3.5 GB (×4.2)
cslib 👍 👍 22.6 s (÷23) 4.6 GB (+35%)
init 👍 👍 3.02 s (÷22) 2.8 GB (×5.1)
init-prelude 👍 👍 25.1 ms (÷14) 27.7 MB (÷2.7)
mathlib 👍 👍 67.9 s (÷29) 9.1 GB (-9%)
navier-stokes-euler 👍 👍 21.5 s (÷31) 4.2 GB (+70%)
reachability 👍 👍 2.95 s (÷8.0) 3.6 GB (×2.2)
std 👍 👍 5.20 s (÷22) 3.0 GB (×3.3)
26 19.4 ms 5.8 MB
closure-level-subst ✋ ✋ 0.414 ms 4.5 MB
constlevels ✋ ✋ 0.492 ms 4.5 MB
ctor-num-fields ✋ ✋ 0.488 ms 4.5 MB
eta-ctor-alias ✋ ✋ 0.445 ms 4.3 MB
forged-quot-ind ✋ ✋ 0.455 ms 4.3 MB
k-rec-conv ✋ ✋ 0.482 ms 4.5 MB
large-elim-param ✋ ✋ 0.442 ms 3.3 MB
large-elim-prop-bool ✋ ✋ 0.495 ms 4.6 MB
level-imax-leq ✋ ✋ 0.410 ms 3.2 MB
level-imax-normalization ✋ ✋ 0.436 ms 4.5 MB
loose-bvar-value ✋ ✋ 0.397 ms 4.3 MB
nat-rec-k-lie ✋ ✋ 0.409 ms 3.3 MB
nat-rec-rules ✋ ✋ 0.416 ms 3.3 MB
nested-name-capture ✋ ✋ 0.573 ms 4.4 MB
nested-rec-rule-nfields ✋ ✋ 0.631 ms 4.6 MB
nested-unused-param ✋ ✋ 0.846 ms 4.5 MB
orphan-rec ✋ ✋ 0.395 ms 3.3 MB
pi-closure-context ✋ ✋ 0.403 ms 4.5 MB
proj-non-structure ✋ ✋ 0.427 ms 4.4 MB
proj-of-imax-prop ✋ ✋ 0.490 ms 4.6 MB
proj-of-stuck-prop ✋ ✋ 2.21 ms 5.5 MB
proj-of-subst-prop ✋ ✋ 2.25 ms 5.7 MB
rec-k-lie ✋ ✋ 0.400 ms 3.1 MB
rec-missing-ih ✋ ✋ 2.25 ms 5.4 MB
rec-of-subst-prop ✋ ✋ 2.37 ms 5.8 MB
unit-rec-rule ✋ ✋ 0.401 ms 3.3 MB
1 16.7 ms 4.9 MB
alg-conv-trans-acc 🤷 ✋ 0.927 ms 4.9 MB
alg-conv-trans-acc-left 🤷 👍 0.917 ms 4.8 MB
alg-conv-trans-acc-right 🤷 👍 0.934 ms 4.8 MB
alg-conv-trans-quot 🤷 ✋ 0.468 ms 4.4 MB
alg-conv-trans-quot-left 🤷 ✋ 0.471 ms 4.6 MB
alg-conv-trans-quot-left-def 🤷 👍 0.474 ms 4.4 MB
alg-conv-trans-quot-right 🤷 👍 0.458 ms 4.5 MB
eta-ctor 🤷 ✋ 0.459 ms 4.4 MB
eta-rec-struct 🤷 ✋ 0.468 ms 4.5 MB
eta-rule-k 🤷 ✋ 0.446 ms 4.5 MB
eta-struct-major-and 🤷 👍 0.460 ms 4.4 MB
eta-struct-major-and-no-whnf 🤷 👍 0.547 ms 4.6 MB
eta-struct-major-no-whnf 🤷 👍 0.610 ms 4.4 MB
eta-unit-like-nested 🤷 ✋ 0.503 ms 4.6 MB
eta-unit-like-pi 🤷 ✋ 0.439 ms 4.4 MB
eta-unit-like-proof-field 🤷 ✋ 0.443 ms 4.3 MB
eta-unit-like-struct 🤷 ✋ 0.446 ms 4.5 MB
imax-nested-absorption 🤷 👍 0.413 ms 4.4 MB
imax-right-successor 🤷 👍 0.406 ms 4.3 MB
large-elim-maybe-prop 🤷 ✋ 0.404 ms 3.3 MB
let-value-type-mismatch 🤷 ✋ 0.399 ms 4.5 MB
nested-nonuniform-param 🤷 👍 0.461 ms 3.3 MB
nested-redex-aux 🤷 👍 0.743 ms 4.6 MB
positivity-whnf 🤷 ✋ 0.423 ms 4.4 MB
proj-maybe-prop 🤷 ✋ 0.453 ms 4.4 MB
proj-maybe-prop-past 🤷 ✋ 0.453 ms 4.3 MB
proof-param-ok 👍 👍 0.406 ms 3.0 MB
proof-param-swap 🤷 ✋ 0.402 ms 3.3 MB
subject-reduction-redex 🤷 👍 0.925 ms 4.8 MB
subject-reduction-reduct 🤷 ✋ 0.911 ms 4.9 MB
vanishing-occurrence 🤷 👍 0.430 ms 3.1 MB
10 4.86 ms 4.6 MB
extra-rec ✋ ✋ 0.395 ms 3.1 MB
inductive-undeclared-universe ✋ ✋ 0.403 ms 3.2 MB
level-index-out-of-order 👍 👍 0.395 ms 4.3 MB
nat-lit-add 👍 👍 0.599 ms 4.4 MB
nat-lit-add-bad ✋ ✋ 0.596 ms 4.6 MB
nat-lit-ble 👍 👍 0.630 ms 4.5 MB
nat-lit-sub 👍 👍 0.633 ms 4.4 MB
orphan-ctor ✋ ✋ 0.395 ms 3.2 MB
proj-of-prop ✋ ✋ 0.421 ms 4.4 MB
sparse-name-index 👍 👍 0.395 ms 4.2 MB
31 8.64 s (÷9.4) 4.6 GB
app-lam 👍 👍 112 ms (÷43) 138.0 MB (÷10)
args-before-unfold 👍 👍 1.33 ms (÷27) 5.8 MB (÷11)
beta-ladder 👍 👍 45.1 ms (÷37) 56.0 MB (÷8.9)
church-numerals 👍 👍 2.60 ms (÷18) 6.8 MB (÷11)
discarded-argument 👍 👍 0.490 ms (÷339) 4.6 MB (÷14)
discarded-argument-match 👍 👍 0.582 ms (÷244) 4.8 MB (÷14)
folded-constant-first 👍 👍 1.94 ms (÷21) 7.3 MB (÷9.5)
folded-constant-last 👍 👍 1.93 ms (÷21) 7.2 MB (÷9.5)
fueled-chain 👍 👍 18.6 ms (÷6.8) 21.4 MB (÷3.5)
grind-ring-5 👍 👍 209 ms (÷10) 249.9 MB (+9%)
identical-nesting 👍 👍 0.450 ms (÷63) 4.4 MB (÷15)
irrelevance-before-evaluation 👍 👍 0.494 ms (÷59) 4.4 MB (÷15)
irrelevance-refutes 👍 👍 0.482 ms (÷59) 4.6 MB (÷15)
let-fold 👍 👍 221 ms (×3.8) 274.3 MB (×4.1)
let-ladder 👍 👍 31.9 ms (÷32) 47.4 MB (÷6.7)
magma-list-deep-n21 👍 👍 264 ms (÷10) 318.1 MB (÷2.1)
magma-list-deep-n36 👍 👍 3.43 s (÷10) 4.4 GB (-45%)
magma-list-pair-n21 👍 👍 3.15 s (÷5.9) 4.6 GB (+17%)
magma-list-pair-n7 👍 👍 261 ms (÷6.5) 425.0 MB (0%)
magma-string-n4 👍 👍 200 ms (÷18) 221.2 MB (+82%)
magma-string-pair-n9 👍 👍 672 ms (÷12) 866.0 MB (-13%)
proj-cheap-struct 👍 👍 1.05 ms (÷33) 4.9 MB (÷13)
proj-lazy-struct 👍 👍 0.726 ms (÷43) 4.6 MB (÷14)
proj-stuck-struct 👍 👍 0.752 ms (÷42) 4.7 MB (÷14)
prop-struct-projections 👍 👍 5.92 ms (÷17) 6.7 MB (÷10)
refute-cheap-first ✋ ✋ 0.524 ms (÷80) 4.5 MB (÷15)
refute-cheap-last ✋ ✋ 2.83 ms (÷64) 5.1 MB (÷14)
repeated-subproblem 👍 👍 0.483 ms (÷59) 4.5 MB (÷15)
shared-subterm 👍 👍 4.44 ms (÷13) 10.9 MB (÷6.7)
shift-cascade 👍 👍 3.42 ms (÷13) 6.7 MB (÷10)
unroll-versus-evaluate 👍 👍 0.648 ms (÷48) 5.3 MB (÷12)
141 60.0 ms 4.8 MB
001_basicDef 👍 👍 0.396 ms 4.4 MB
002_badDef ✋ ✋ 0.397 ms 4.5 MB
003_arrowType 👍 👍 0.397 ms 4.4 MB
004_dependentType 👍 👍 0.396 ms 4.4 MB
005_constType 👍 👍 0.398 ms 4.3 MB
006_betaReduction 👍 👍 0.401 ms 4.4 MB
007_betaReduction2 👍 👍 0.402 ms 4.3 MB
008_forallSortWhnf 👍 👍 0.402 ms 4.3 MB
009_forallSortBad ✋ ✋ 0.402 ms 4.3 MB
010_nonTypeType ✋ ✋ 0.400 ms 4.3 MB
011_nonTypeAxiom ✋ ✋ 0.400 ms 4.2 MB
012_nonPropThm ✋ ✋ 0.395 ms 4.3 MB
013_thmProof 👍 👍 0.401 ms 4.4 MB
014_selfProof ✋ ✋ 0.396 ms 4.4 MB
015_levelComp1 👍 👍 0.397 ms 4.5 MB
016_levelComp2 👍 👍 0.398 ms 4.4 MB
017_levelComp3 👍 👍 0.399 ms 4.4 MB
018_levelParams 👍 👍 0.403 ms 4.4 MB
019_tut06_bad01 ✋ ✋ 0.389 ms 3.0 MB
020_levelComp4 👍 👍 0.396 ms 4.3 MB
021_levelComp5 👍 👍 0.396 ms 4.4 MB
022_imax1 👍 👍 0.398 ms 4.3 MB
023_imax2 👍 👍 0.398 ms 4.4 MB
024_levelMaxComm 👍 👍 0.400 ms 4.5 MB
025_levelMaxAssoc 👍 👍 0.402 ms 4.2 MB
026_levelMaxIdem 👍 👍 0.398 ms 4.4 MB
027_levelMaxAbsorb 👍 👍 0.400 ms 4.2 MB
028_inferVar 👍 👍 0.397 ms 4.4 MB
029_defEqLambda 👍 👍 0.401 ms 4.3 MB
030_peano1 👍 👍 0.419 ms 4.3 MB
031_peano2 👍 👍 0.430 ms 4.4 MB
032_peano3 👍 👍 0.438 ms 4.6 MB
033_letType 👍 👍 0.397 ms 4.4 MB
034_letTypeDep 👍 👍 0.401 ms 4.4 MB
035_letRed 👍 👍 0.398 ms 4.4 MB
036_empty 👍 👍 0.402 ms 4.4 MB
037_boolType 👍 👍 0.408 ms 4.2 MB
038_twoBool 👍 👍 0.419 ms 4.3 MB
039_andType 👍 👍 0.417 ms 4.3 MB
040_prodType 👍 👍 0.425 ms 4.2 MB
041_pprodType 👍 👍 0.424 ms 4.3 MB
042_pUnitType 👍 👍 0.407 ms 4.2 MB
043_eqType 👍 👍 0.418 ms 4.3 MB
044_natDef 👍 👍 0.414 ms 4.4 MB
045_rbTreeDef 👍 👍 0.507 ms 4.4 MB
046_inductBadNonSort ✋ ✋ 0.402 ms 4.5 MB
047_inductBadNonSort2 ✋ ✋ 0.398 ms 4.0 MB
048_inductLevelParam ✋ ✋ 0.390 ms 3.1 MB
049_inductTooFewParams ✋ ✋ 0.390 ms 3.2 MB
050_inductWrongCtorParams ✋ ✋ 0.404 ms 4.3 MB
051_inductWrongCtorResParams ✋ ✋ 0.398 ms 3.2 MB
052_inductWrongCtorResLevel ✋ ✋ 0.399 ms 3.1 MB
053_inductInIndex ✋ ✋ 0.403 ms 4.2 MB
054_indNeg ✋ ✋ 0.395 ms 3.3 MB
055_reduceCtorParam.mk 👍 👍 0.424 ms 4.5 MB
056_reduceCtorType.mk ✋ ✋ 0.406 ms 4.2 MB
057_indNegReducible ✋ ✋ 0.408 ms 4.4 MB
058_predWithTypeField 👍 👍 0.407 ms 4.4 MB
059_typeWithTypeField 👍 👍 0.408 ms 4.4 MB
060_typeWithTypeFieldPoly 👍 👍 0.409 ms 4.4 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 0.395 ms 3.3 MB
062_emptyRec 👍 👍 0.404 ms 4.3 MB
063_boolRec 👍 👍 0.413 ms 4.4 MB
064_twoBoolRec 👍 👍 0.424 ms 4.4 MB
065_andRec 👍 👍 0.421 ms 4.2 MB
066_prodRec 👍 👍 0.432 ms 4.4 MB
067_pprodRec 👍 👍 0.432 ms 4.5 MB
068_punitRec 👍 👍 0.412 ms 4.5 MB
069_eqRec 👍 👍 0.422 ms 4.4 MB
070_nRec 👍 👍 0.417 ms 4.4 MB
071_rbTreeRef 👍 👍 0.529 ms 4.6 MB
072_boolPropRec 👍 👍 0.410 ms 4.4 MB
073_BogusRecursor ✋ ✋ 0.401 ms 3.1 MB
074_existsRec 👍 👍 0.427 ms 4.3 MB
075_typeSingletonRecReduction 👍 👍 0.447 ms 4.5 MB
076_sortElimPropRec 👍 👍 0.435 ms 4.4 MB
077_sortElimProp2Rec 👍 👍 0.441 ms 4.3 MB
078_boolRecEqns 👍 👍 0.462 ms 4.4 MB
079_prodRecEqns 👍 👍 0.462 ms 4.6 MB
080_nRecReduction 👍 👍 0.477 ms 4.6 MB
081_listRecReduction 👍 👍 0.516 ms 4.6 MB
082_RBTree.id_spec 👍 👍 0.722 ms 4.8 MB
083_And.right 👍 👍 0.422 ms 4.3 MB
084_Prod.snd 👍 👍 0.429 ms 4.5 MB
085_PProd.snd 👍 👍 0.429 ms 4.4 MB
086_PSigma.snd 👍 👍 0.435 ms 4.4 MB
087_projOutOfRange ✋ ✋ 0.420 ms 4.4 MB
088_projNotStruct ✋ ✋ 0.415 ms 4.4 MB
089_projProp1 👍 👍 0.453 ms 4.4 MB
090_projProp2 ✋ ✋ 0.454 ms 4.2 MB
091_projProp3 👍 👍 0.453 ms 4.4 MB
092_projProp4 ✋ ✋ 0.454 ms 4.2 MB
093_projProp5 ✋ ✋ 0.455 ms 4.3 MB
094_projProp6 ✋ ✋ 0.454 ms 4.3 MB
095_projDataIndexRec 👍 👍 0.441 ms 4.4 MB
096_projIndexData ✋ ✋ 0.486 ms 4.4 MB
097_projIndexData2 ✋ ✋ 0.487 ms 4.4 MB
098_projRed 👍 👍 0.467 ms 4.2 MB
099_ruleK 👍 👍 0.438 ms 4.5 MB
100_ruleKbad ✋ ✋ 0.445 ms 4.4 MB
101_ruleKAcc ✋ ✋ 0.497 ms 4.7 MB
102_aNatLit 👍 👍 0.413 ms 4.2 MB
103_natLitEq 👍 👍 0.436 ms 4.4 MB
104_proofIrrelevance 👍 👍 0.430 ms 4.4 MB
105_proofIrrelevanceBad ✋ ✋ 0.431 ms 4.4 MB
106_proofIrrelevanceWhnf 👍 👍 0.434 ms 4.4 MB
107_proofIrrelevanceUnderBinder 👍 👍 0.405 ms 4.5 MB
108_unitEta1 👍 👍 0.440 ms 4.4 MB
109_unitEta2 👍 👍 0.437 ms 4.5 MB
110_unitEta3 👍 👍 0.437 ms 4.5 MB
111_indexedUnitEta ✋ ✋ 0.446 ms 4.3 MB
112_structEta 👍 👍 0.484 ms 4.5 MB
113_indexedStructEta ✋ ✋ 0.455 ms 4.5 MB
114_funEta 👍 👍 0.431 ms 4.4 MB
115_funEtaDep 👍 👍 0.432 ms 4.5 MB
116_funEtaBad ✋ ✋ 0.435 ms 4.2 MB
117_reflOccLeft ✋ ✋ 0.411 ms 3.2 MB
118_reflOccInIndex ✋ ✋ 0.413 ms 3.3 MB
119_reduceCtorParamRefl.mk 👍 👍 0.427 ms 4.4 MB
120_reduceCtorParamRefl2.mk 👍 👍 0.427 ms 4.5 MB
121_rTreeRec 👍 👍 0.433 ms 4.4 MB
122_rtreeRecReduction 👍 👍 0.465 ms 4.6 MB
123_accRecType 👍 👍 0.463 ms 4.4 MB
124_accRecReduction 👍 👍 0.491 ms 4.4 MB
125_accRecNoEta ✋ ✋ 0.497 ms 4.6 MB
126_quotMkType 👍 👍 0.439 ms 4.3 MB
127_quotIndType 👍 👍 0.441 ms 4.4 MB
128_quotLiftType 👍 👍 0.444 ms 4.4 MB
129_quotSoundType 👍 👍 0.444 ms 4.3 MB
130_quotLiftReduction 👍 👍 0.449 ms 4.4 MB
131_quotIndReduction 👍 👍 0.448 ms 4.4 MB
132_dup_defs ✋ ✋ 0.397 ms 4.3 MB
133_dup_ind_def ✋ ✋ 0.402 ms 4.4 MB
134_dup_ctor_def ✋ ✋ 0.402 ms 4.2 MB
135_dup_rec_def ✋ ✋ 0.402 ms 4.2 MB
136_misnamed_rec_user ✋ ✋ 0.397 ms 3.2 MB
137_dup_rec_def2 ✋ ✋ 0.406 ms 4.4 MB
138_dup_ctor_rec ✋ ✋ 0.397 ms 3.2 MB
139_DupConCon ✋ ✋ 0.397 ms 3.2 MB
140_falseFromUnsafe ✋ ✋ 0.407 ms 4.3 MB
141_falseFromPartial ✋ ✋ 0.402 ms 4.3 MB