Lean Kernel Arena / tenet-jvm

Checker "tenet-jvm"

Language: Java Java · Version: 0.1.6 · 📄 Declaration · 🔗 Source

tenet-jvm is an independent implementation of the Lean 4 kernel in Java, written from the type theory and the reference kernel's behavior rather than translated from it. It is a sibling of Tenet (.NET) and tenet-hs (Haskell), and the three are maintained together: the more independent kernels there are, the more chances to find a bug in the reference kernel, in the others, or in the specification they are all trying to match.

It reads lean4export NDJSON and does not believe the export for anything it can derive: from the types and constructor types alone it regenerates every recursor, recursor rule and bookkeeping flag (mutual and nested inductives included, by introducing and translating back the auxiliary types) and rejects the file on any difference. The quotient constants are compared with their canonical types. It has no dependencies beyond a JDK.

The process fails closed: the verdict starts as "error" and becomes "accepted" only after a non-empty export with a metadata record has been processed in full, and any exception, including an out-of-memory error, is a non-zero exit. A crash can therefore never read as acceptance.

Everywhere it deliberately decides something differently from Lean is written down in docs/divergences.md. Two matter here: universe levels are compared by case-splitting on the parameters under an imax, so Sort (imax 1 0) is a proposition, and a type whose sort does not reduce to a Sort is an error rather than "not a proposition" (lean4#14807). Lean.reduceBool and Lean.reduceNat are not evaluated; a proof that needs them is rejected, not declined.

It is single-threaded. On the author's laptop it checked all of Mathlib (Lean 4.34.1 export) in about 824 s with a peak footprint near 10 GB; it has not been tried on Linux or in the arena's own runner.

Written by Claude (Anthropic), directed by Keith Adler.

Soundness (rightfully rejected tests)

96 ✅ 1 ❌ 0 🚫

Completeness (rightfully accepted tests)

149 ✅ 1 ❌ 0 🚫

Corner cases (no outcome prescribed)

28 ✅ 2 🚫

Test Expected Result ⏱️ 🧠
cedar 👍 👍 82.0 s (-44%) 4.6 GB (×3.3)
con-leche 👍 👍 72.2 s (÷3.0) 4.5 GB (-35%)
cslib 👍 👍 5.10 min (-46%) 7.7 GB (×2.2)
init 👍 👍 37.6 s (-44%) 4.2 GB (×7.3)
init-prelude 👍 👍 1.70 s (×4.5) 203.5 MB (×2.0)
mathlib 👍 👍 21.0 min (-37%) 12.1 GB (+23%)
navier-stokes-euler 👍 👍 8.28 min (-26%) 5.0 GB (×2.0)
reachability 👍 👍 21.0 s (-11%) 4.4 GB (×2.7)
std 👍 👍 62.1 s (-44%) 4.4 GB (×4.8)
38 7.43 s 130.0 MB
closure-level-subst ✋ ✋ 107 ms 77.1 MB
const-level-arity ✋ ✋ 100 ms 76.2 MB
constlevels ✋ ✋ 131 ms 77.6 MB
ctor-num-fields ✋ ✋ 160 ms 80.0 MB
eta-ctor-alias ✋ ✋ 119 ms 77.5 MB
inductive-forged-all ✋ ✋ 102 ms 76.0 MB
k-rec-conv ✋ ✋ 124 ms 77.4 MB
large-elim-param ✋ ✋ 115 ms 77.3 MB
large-elim-prop-bool ✋ ✋ 136 ms 77.7 MB
level-imax-leq ✋ ✋ 107 ms 76.2 MB
level-imax-normalization ✋ ✋ 122 ms 77.5 MB
loose-bvar-value ✋ ✋ 94.5 ms 76.1 MB
nat-log2-not-native 👍 ✋ 167 ms 80.9 MB
nat-log2-not-native-bad ✋ 👍 161 ms 80.1 MB
nat-rec-k-lie ✋ ✋ 112 ms 77.1 MB
nat-rec-rules ✋ ✋ 118 ms 76.9 MB
nat-shift-huge 👍 👍 453 ms 109.7 MB
nested-name-capture ✋ ✋ 150 ms 79.0 MB
nested-rec-hijack ✋ ✋ 128 ms 76.9 MB
nested-rec-rule-nfields ✋ ✋ 168 ms 80.1 MB
nested-unused-param ✋ ✋ 213 ms 83.7 MB
open-term-cache-context ✋ ✋ 100 ms 76.5 MB
orphan-rec ✋ ✋ 102 ms 76.5 MB
pi-closure-context ✋ ✋ 97.9 ms 76.3 MB
proj-non-structure ✋ ✋ 108 ms 76.7 MB
proj-of-imax-prop ✋ ✋ 126 ms 77.0 MB
proj-of-param-prop ✋ ✋ 121 ms 76.7 MB
proj-of-stuck-prop ✋ ✋ 395 ms 102.8 MB
proj-of-subst-prop ✋ ✋ 380 ms 100.2 MB
quot-bad-type ✋ ✋ 102 ms 76.4 MB
rec-k-lie ✋ ✋ 106 ms 76.4 MB
rec-missing-ih ✋ ✋ 385 ms 102.7 MB
rec-of-subst-prop ✋ ✋ 372 ms 97.9 MB
rec-rule-proof-irrel ✋ ✋ 141 ms 77.9 MB
rec-rule-proof-irrel-nested ✋ ✋ 158 ms 79.5 MB
rec-rule-wrong-arg ✋ ✋ 133 ms 77.3 MB
rec-type-proof-irrel ✋ ✋ 140 ms 77.6 MB
str-lit-utf8 👍 👍 580 ms 124.5 MB
str-lit-utf8-bad ✋ ✋ 680 ms 130.0 MB
unit-rec-rule ✋ ✋ 109 ms 76.6 MB
1 3.69 s 85.7 MB
alg-conv-trans-acc 🤷 ✋ 205 ms 83.0 MB
alg-conv-trans-acc-left 🤷 👍 187 ms 82.4 MB
alg-conv-trans-acc-right 🤷 👍 201 ms 82.7 MB
alg-conv-trans-quot 🤷 ✋ 114 ms 76.8 MB
alg-conv-trans-quot-left 🤷 ✋ 116 ms 76.5 MB
alg-conv-trans-quot-left-def 🤷 👍 110 ms 76.8 MB
alg-conv-trans-quot-right 🤷 👍 107 ms 76.3 MB
eta-ctor 🤷 ✋ 120 ms 77.2 MB
eta-rec-struct 🤷 ✋ 123 ms 77.3 MB
eta-rule-k 🤷 ✋ 110 ms 76.6 MB
eta-struct-major-and 🤷 ✋ 119 ms 77.3 MB
eta-struct-major-and-no-whnf 🤷 ⌛ — —
eta-struct-major-no-whnf 🤷 ⌛ — —
eta-unit-like-nested 🤷 ✋ 137 ms 77.7 MB
eta-unit-like-pi 🤷 ✋ 119 ms 77.1 MB
eta-unit-like-proof-field 🤷 ✋ 112 ms 76.9 MB
eta-unit-like-struct 🤷 ✋ 122 ms 76.8 MB
imax-nested-absorption 🤷 👍 93.0 ms 72.2 MB
imax-right-successor 🤷 👍 93.5 ms 72.0 MB
large-elim-maybe-prop 🤷 ✋ 99.7 ms 76.7 MB
let-value-type-mismatch 🤷 ✋ 94.8 ms 76.0 MB
nested-nonuniform-param 🤷 👍 106 ms 76.7 MB
nested-redex-aux 🤷 👍 174 ms 80.8 MB
positivity-whnf 🤷 ✋ 103 ms 76.8 MB
proj-maybe-prop 🤷 👍 108 ms 76.0 MB
proj-maybe-prop-past 🤷 👍 113 ms 76.1 MB
proof-param-ok 👍 👍 88.1 ms 75.5 MB
proof-param-swap 🤷 ✋ 106 ms 76.0 MB
subject-reduction-redex 🤷 👍 208 ms 85.7 MB
subject-reduction-reduct 🤷 ✋ 208 ms 83.1 MB
vanishing-occurrence 🤷 👍 93.6 ms 75.5 MB
10 1.14 s 77.9 MB
extra-rec ✋ ✋ 103 ms 76.7 MB
inductive-undeclared-universe ✋ ✋ 101 ms 76.4 MB
level-index-out-of-order 👍 👍 91.7 ms 71.9 MB
nat-lit-add 👍 👍 131 ms 77.5 MB
nat-lit-add-bad ✋ ✋ 142 ms 77.9 MB
nat-lit-ble 👍 👍 140 ms 77.9 MB
nat-lit-sub 👍 👍 136 ms 77.5 MB
orphan-ctor ✋ ✋ 98.0 ms 75.7 MB
proj-of-prop ✋ ✋ 113 ms 77.0 MB
sparse-name-index 👍 👍 85.8 ms 71.9 MB
46 5.50 min (+41%) 7.6 GB
app-lam 👍 👍 11.7 s (×2.4) 2.8 GB (+94%)
args-before-unfold 👍 👍 274 ms (×6.8) 86.1 MB (-7%)
beta-ladder 👍 👍 2.16 s (+29%) 596.6 MB (+13%)
church-numerals 👍 👍 427 ms (×8.3) 113.9 MB (+9%)
discarded-argument 👍 👍 235 ms (+39%) 85.8 MB (-6%)
discarded-argument-match 👍 👍 329 ms (×2.3) 94.5 MB (+1%)
folded-constant-first 👍 👍 290 ms (×6.4) 88.3 MB (-7%)
folded-constant-last 👍 👍 275 ms (×6.1) 87.2 MB (-8%)
fueled-chain 👍 👍 689 ms (×5.2) 166.0 MB (+63%)
gf3-matrix-product 👍 👍 10.6 s (×5.9) 4.9 GB (+39%)
grind-field-kernel-cancel 👍 👍 17.3 s (-33%) 2.9 GB (×8.0)
grind-ring-5 👍 👍 3.84 s (+76%) 511.8 MB (×2.0)
identical-nesting 👍 👍 109 ms (×3.4) 76.7 MB (-16%)
irrelevance-before-evaluation 👍 👍 123 ms (×3.7) 77.0 MB (-16%)
irrelevance-refutes 👍 👍 124 ms (×3.8) 77.2 MB (-16%)
ite-taken-branch 👍 👍 18.1 s (-7%) 4.2 GB (×2.5)
ite-taken-branch-bad ✋ ✋ 13.6 s (×2.0) 3.3 GB (+99%)
let-fold 👍 👍 2.42 s (×39) 569.5 MB (×6.0)
let-ladder 👍 👍 1.30 s (+29%) 448.9 MB (+36%)
loop-unfolded-once 👍 👍 1.99 s (×3.8) 229.2 MB (×2.3)
loop-unfolded-once-bad ✋ ✋ 2.71 s (÷5.3) 293.5 MB (×2.8)
magma-list-deep-n21 👍 👍 5.16 s (+91%) 1.1 GB (+57%)
magma-list-deep-n36 👍 👍 58.1 s (+64%) 7.6 GB (-2%)
magma-list-pair-n21 👍 👍 19.3 s (+4%) 4.8 GB (+21%)
magma-list-pair-n7 👍 👍 2.46 s (+44%) 612.3 MB (+35%)
magma-string-n4 👍 👍 4.84 s (+35%) 750.2 MB (×5.0)
magma-string-pair-n9 👍 👍 14.9 s (+81%) 2.4 GB (×2.4)
proj-app-lazy-delta 👍 👍 3.06 s (+47%) 754.4 MB (+23%)
proj-applied-struct 👍 👍 15.0 s (+7%) 3.7 GB (×2.6)
proj-applied-struct-arg-bad ✋ ✋ 11.2 s (×2.4) 3.0 GB (×2.1)
proj-applied-struct-bad ✋ ✋ 11.2 s (×2.3) 3.1 GB (×2.2)
proj-cheap-struct 👍 👍 202 ms (×5.2) 83.7 MB (-9%)
proj-lazy-struct 👍 👍 161 ms (×4.5) 79.8 MB (-13%)
proj-stuck-struct 👍 👍 175 ms (×4.9) 81.1 MB (-12%)
prop-struct-projections 👍 👍 684 ms (×6.6) 145.6 MB (+51%)
refute-cheap-first ✋ ✋ 135 ms (×3.3) 77.5 MB (-17%)
refute-cheap-last ✋ ✋ 641 ms (×3.6) 158.3 MB (+69%)
repeated-subproblem 👍 👍 115 ms (×3.5) 76.4 MB (-17%)
shared-subterm 👍 👍 371 ms (×6.0) 97.8 MB (-2%)
shift-cascade 👍 👍 285 ms (×5.6) 94.4 MB (0%)
short-circuit-and 👍 👍 16.8 s (-4%) 3.8 GB (×2.5)
short-circuit-and-bad ✋ ✋ 13.0 s (×2.1) 3.1 GB (×2.0)
unfold-before-literal 👍 👍 22.7 s (+57%) 3.7 GB (×2.6)
unfold-before-literal-bad ✋ ✋ 18.8 s (×3.9) 3.0 GB (×2.1)
unfold-before-literal-fallback 👍 👍 21.7 s (+50%) 3.7 GB (×2.6)
unroll-versus-evaluate 👍 👍 169 ms (×4.8) 80.5 MB (-13%)
141 14.4 s 81.1 MB
001_basicDef 👍 👍 92.0 ms 72.4 MB
002_badDef ✋ ✋ 99.5 ms 72.1 MB
003_arrowType 👍 👍 92.6 ms 76.6 MB
004_dependentType 👍 👍 94.4 ms 76.1 MB
005_constType 👍 👍 89.4 ms 76.0 MB
006_betaReduction 👍 👍 90.9 ms 75.9 MB
007_betaReduction2 👍 👍 95.3 ms 76.4 MB
008_forallSortWhnf 👍 👍 95.0 ms 75.9 MB
009_forallSortBad ✋ ✋ 99.1 ms 76.1 MB
010_nonTypeType ✋ ✋ 98.4 ms 76.5 MB
011_nonTypeAxiom ✋ ✋ 94.9 ms 76.0 MB
012_nonPropThm ✋ ✋ 95.0 ms 76.1 MB
013_thmProof 👍 👍 96.6 ms 76.3 MB
014_selfProof ✋ ✋ 99.7 ms 76.2 MB
015_levelComp1 👍 👍 91.3 ms 72.1 MB
016_levelComp2 👍 👍 91.3 ms 72.4 MB
017_levelComp3 👍 👍 93.3 ms 72.0 MB
018_levelParams 👍 👍 89.8 ms 76.2 MB
019_tut06_bad01 ✋ ✋ 90.1 ms 72.0 MB
020_levelComp4 👍 👍 86.4 ms 71.8 MB
021_levelComp5 👍 👍 91.0 ms 71.9 MB
022_imax1 👍 👍 89.9 ms 75.3 MB
023_imax2 👍 👍 86.9 ms 75.9 MB
024_levelMaxComm 👍 👍 93.1 ms 71.9 MB
025_levelMaxAssoc 👍 👍 87.3 ms 72.1 MB
026_levelMaxIdem 👍 👍 93.0 ms 72.2 MB
027_levelMaxAbsorb 👍 👍 91.9 ms 71.9 MB
028_inferVar 👍 👍 95.3 ms 75.5 MB
029_defEqLambda 👍 👍 95.4 ms 76.1 MB
030_peano1 👍 👍 99.9 ms 75.4 MB
031_peano2 👍 👍 95.7 ms 75.8 MB
032_peano3 👍 👍 95.9 ms 76.2 MB
033_letType 👍 👍 86.8 ms 76.1 MB
034_letTypeDep 👍 👍 90.7 ms 76.3 MB
035_letRed 👍 👍 94.5 ms 75.8 MB
036_empty 👍 👍 96.5 ms 76.6 MB
037_boolType 👍 👍 95.2 ms 75.9 MB
038_twoBool 👍 👍 102 ms 76.0 MB
039_andType 👍 👍 96.5 ms 76.2 MB
040_prodType 👍 👍 96.7 ms 76.1 MB
041_pprodType 👍 👍 96.5 ms 76.3 MB
042_pUnitType 👍 👍 96.0 ms 76.8 MB
043_eqType 👍 👍 99.2 ms 75.9 MB
044_natDef 👍 👍 101 ms 77.7 MB
045_rbTreeDef 👍 👍 123 ms 77.2 MB
046_inductBadNonSort ✋ ✋ 102 ms 76.7 MB
047_inductBadNonSort2 ✋ ✋ 99.2 ms 71.9 MB
048_inductLevelParam ✋ ✋ 102 ms 72.9 MB
049_inductTooFewParams ✋ ✋ 96.4 ms 75.6 MB
050_inductWrongCtorParams ✋ ✋ 103 ms 77.0 MB
051_inductWrongCtorResParams ✋ ✋ 96.9 ms 76.0 MB
052_inductWrongCtorResLevel ✋ ✋ 102 ms 76.0 MB
053_inductInIndex ✋ ✋ 102 ms 76.6 MB
054_indNeg ✋ ✋ 102 ms 76.2 MB
055_reduceCtorParam.mk 👍 👍 96.4 ms 76.5 MB
056_reduceCtorType.mk ✋ ✋ 100 ms 76.9 MB
057_indNegReducible ✋ ✋ 105 ms 77.2 MB
058_predWithTypeField 👍 👍 96.5 ms 76.3 MB
059_typeWithTypeField 👍 👍 92.3 ms 75.9 MB
060_typeWithTypeFieldPoly 👍 👍 94.3 ms 76.8 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 102 ms 76.0 MB
062_emptyRec 👍 👍 97.4 ms 76.8 MB
063_boolRec 👍 👍 99.8 ms 76.2 MB
064_twoBoolRec 👍 👍 106 ms 76.2 MB
065_andRec 👍 👍 102 ms 75.9 MB
066_prodRec 👍 👍 97.0 ms 76.4 MB
067_pprodRec 👍 👍 96.8 ms 76.0 MB
068_punitRec 👍 👍 104 ms 76.7 MB
069_eqRec 👍 👍 95.8 ms 76.0 MB
070_nRec 👍 👍 100 ms 77.0 MB
071_rbTreeRef 👍 👍 127 ms 76.7 MB
072_boolPropRec 👍 👍 99.9 ms 76.1 MB
073_BogusRecursor ✋ ✋ 107 ms 77.0 MB
074_existsRec 👍 👍 94.1 ms 75.6 MB
075_typeSingletonRecReduction 👍 👍 104 ms 76.2 MB
076_sortElimPropRec 👍 👍 104 ms 75.6 MB
077_sortElimProp2Rec 👍 👍 99.8 ms 76.4 MB
078_boolRecEqns 👍 👍 110 ms 76.4 MB
079_prodRecEqns 👍 👍 112 ms 76.5 MB
080_nRecReduction 👍 👍 120 ms 77.0 MB
081_listRecReduction 👍 👍 128 ms 76.9 MB
082_RBTree.id_spec 👍 👍 189 ms 81.1 MB
083_And.right 👍 👍 99.3 ms 75.9 MB
084_Prod.snd 👍 👍 98.3 ms 76.3 MB
085_PProd.snd 👍 👍 98.9 ms 76.3 MB
086_PSigma.snd 👍 👍 98.7 ms 76.5 MB
087_projOutOfRange ✋ ✋ 109 ms 76.6 MB
088_projNotStruct ✋ ✋ 105 ms 77.3 MB
089_projProp1 👍 👍 114 ms 76.9 MB
090_projProp2 ✋ ✋ 113 ms 76.4 MB
091_projProp3 👍 👍 109 ms 76.1 MB
092_projProp4 ✋ ✋ 110 ms 76.6 MB
093_projProp5 ✋ ✋ 117 ms 77.8 MB
094_projProp6 ✋ ✋ 109 ms 76.8 MB
095_projDataIndexRec 👍 👍 110 ms 77.4 MB
096_projIndexData ✋ ✋ 125 ms 77.7 MB
097_projIndexData2 ✋ ✋ 128 ms 77.2 MB
098_projRed 👍 👍 109 ms 76.7 MB
099_ruleK 👍 👍 106 ms 76.1 MB
100_ruleKbad ✋ ✋ 111 ms 76.4 MB
101_ruleKAcc ✋ ✋ 133 ms 77.1 MB
102_aNatLit 👍 👍 100 ms 76.6 MB
103_natLitEq 👍 👍 98.4 ms 75.9 MB
104_proofIrrelevance 👍 👍 102 ms 76.0 MB
105_proofIrrelevanceBad ✋ ✋ 107 ms 76.6 MB
106_proofIrrelevanceWhnf 👍 👍 102 ms 76.6 MB
107_proofIrrelevanceUnderBinder 👍 👍 96.5 ms 76.6 MB
108_unitEta1 👍 👍 107 ms 76.4 MB
109_unitEta2 👍 👍 103 ms 76.7 MB
110_unitEta3 👍 👍 104 ms 76.0 MB
111_indexedUnitEta ✋ ✋ 119 ms 76.8 MB
112_structEta 👍 👍 121 ms 76.4 MB
113_indexedStructEta ✋ ✋ 113 ms 76.9 MB
114_funEta 👍 👍 96.2 ms 75.8 MB
115_funEtaDep 👍 👍 97.3 ms 76.0 MB
116_funEtaBad ✋ ✋ 109 ms 77.0 MB
117_reflOccLeft ✋ ✋ 108 ms 77.5 MB
118_reflOccInIndex ✋ ✋ 103 ms 76.4 MB
119_reduceCtorParamRefl.mk 👍 👍 98.5 ms 76.1 MB
120_reduceCtorParamRefl2.mk 👍 👍 94.0 ms 76.7 MB
121_rTreeRec 👍 👍 106 ms 76.0 MB
122_rtreeRecReduction 👍 👍 116 ms 76.2 MB
123_accRecType 👍 👍 111 ms 76.3 MB
124_accRecReduction 👍 👍 121 ms 77.3 MB
125_accRecNoEta ✋ ✋ 126 ms 77.4 MB
126_quotMkType 👍 👍 104 ms 76.2 MB
127_quotIndType 👍 👍 105 ms 76.3 MB
128_quotLiftType 👍 👍 100 ms 76.3 MB
129_quotSoundType 👍 👍 103 ms 76.2 MB
130_quotLiftReduction 👍 👍 108 ms 76.0 MB
131_quotIndReduction 👍 👍 103 ms 76.3 MB
132_dup_defs ✋ ✋ 95.6 ms 72.6 MB
133_dup_ind_def ✋ ✋ 98.1 ms 76.3 MB
134_dup_ctor_def ✋ ✋ 95.3 ms 76.3 MB
135_dup_rec_def ✋ ✋ 103 ms 76.1 MB
136_misnamed_rec_user ✋ ✋ 101 ms 75.8 MB
137_dup_rec_def2 ✋ ✋ 101 ms 76.7 MB
138_dup_ctor_rec ✋ ✋ 94.5 ms 76.1 MB
139_DupConCon ✋ ✋ 98.4 ms 76.2 MB
140_falseFromUnsafe ✋ ✋ 102 ms 76.2 MB
141_falseFromPartial ✋ ✋ 102 ms 76.3 MB