Lean Kernel Arena / tenet-jvm

Checker "tenet-jvm"

Language: Java Java · Version: 0.1.3 · 📄 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)

84 ✅ 0 ❌ 0 🚫

Completeness (rightfully accepted tests)

139 ✅ 0 ❌ 0 🚫

Corner cases (no outcome prescribed)

28 ✅ 2 🚫

Test Expected Result ⏱️ 🧠
cedar 👍 👍 76.9 s (-46%) 4.9 GB (×3.6)
con-leche 👍 👍 60.5 s (-45%) 4.7 GB (×5.4)
cslib 👍 👍 4.90 min (-43%) 7.7 GB (×2.2)
init 👍 👍 37.3 s (-44%) 4.4 GB (×7.4)
init-prelude 👍 👍 1.59 s (×4.3) 175.3 MB (+60%)
mathlib 👍 👍 23.2 min (-27%) 12.0 GB (+21%)
navier-stokes-euler 👍 👍 8.17 min (-27%) 5.6 GB (×2.3)
reachability 👍 👍 21.4 s (-9%) 4.3 GB (×2.6)
std 👍 👍 61.1 s (-46%) 4.8 GB (×5.1)
30 4.75 s 91.2 MB
closure-level-subst ✋ ✋ 107 ms 64.0 MB
constlevels ✋ ✋ 125 ms 65.3 MB
ctor-num-fields ✋ ✋ 140 ms 65.5 MB
eta-ctor-alias ✋ ✋ 117 ms 64.5 MB
k-rec-conv ✋ ✋ 126 ms 64.8 MB
large-elim-param ✋ ✋ 111 ms 63.9 MB
large-elim-prop-bool ✋ ✋ 134 ms 65.2 MB
level-imax-leq ✋ ✋ 108 ms 64.6 MB
level-imax-normalization ✋ ✋ 116 ms 64.8 MB
loose-bvar-value ✋ ✋ 93.8 ms 63.6 MB
nat-rec-k-lie ✋ ✋ 106 ms 64.0 MB
nat-rec-rules ✋ ✋ 116 ms 64.6 MB
nested-name-capture ✋ ✋ 144 ms 65.5 MB
nested-rec-rule-nfields ✋ ✋ 155 ms 67.1 MB
nested-unused-param ✋ ✋ 212 ms 72.2 MB
open-term-cache-context ✋ ✋ 102 ms 64.1 MB
orphan-rec ✋ ✋ 102 ms 63.5 MB
pi-closure-context ✋ ✋ 98.2 ms 64.6 MB
proj-non-structure ✋ ✋ 104 ms 64.5 MB
proj-of-imax-prop ✋ ✋ 124 ms 65.1 MB
proj-of-stuck-prop ✋ ✋ 370 ms 89.5 MB
proj-of-subst-prop ✋ ✋ 378 ms 89.3 MB
rec-k-lie ✋ ✋ 108 ms 64.5 MB
rec-missing-ih ✋ ✋ 397 ms 91.2 MB
rec-of-subst-prop ✋ ✋ 381 ms 91.0 MB
rec-rule-proof-irrel ✋ ✋ 138 ms 66.0 MB
rec-rule-proof-irrel-nested ✋ ✋ 155 ms 66.4 MB
rec-rule-wrong-arg ✋ ✋ 132 ms 65.4 MB
rec-type-proof-irrel ✋ ✋ 141 ms 65.6 MB
unit-rec-rule ✋ ✋ 106 ms 64.4 MB
1 3.71 s 71.6 MB
alg-conv-trans-acc 🤷 ✋ 206 ms 71.0 MB
alg-conv-trans-acc-left 🤷 👍 205 ms 71.0 MB
alg-conv-trans-acc-right 🤷 👍 204 ms 69.6 MB
alg-conv-trans-quot 🤷 ✋ 118 ms 64.9 MB
alg-conv-trans-quot-left 🤷 ✋ 119 ms 64.9 MB
alg-conv-trans-quot-left-def 🤷 👍 114 ms 64.5 MB
alg-conv-trans-quot-right 🤷 👍 111 ms 64.2 MB
eta-ctor 🤷 ✋ 118 ms 64.4 MB
eta-rec-struct 🤷 ✋ 119 ms 64.8 MB
eta-rule-k 🤷 ✋ 113 ms 64.5 MB
eta-struct-major-and 🤷 ✋ 119 ms 64.7 MB
eta-struct-major-and-no-whnf 🤷 ⌛ — —
eta-struct-major-no-whnf 🤷 ⌛ — —
eta-unit-like-nested 🤷 ✋ 131 ms 64.7 MB
eta-unit-like-pi 🤷 ✋ 111 ms 63.8 MB
eta-unit-like-proof-field 🤷 ✋ 111 ms 64.0 MB
eta-unit-like-struct 🤷 ✋ 118 ms 64.1 MB
imax-nested-absorption 🤷 👍 90.9 ms 63.3 MB
imax-right-successor 🤷 👍 91.1 ms 62.8 MB
large-elim-maybe-prop 🤷 ✋ 106 ms 64.2 MB
let-value-type-mismatch 🤷 ✋ 97.9 ms 63.2 MB
nested-nonuniform-param 🤷 👍 112 ms 63.9 MB
nested-redex-aux 🤷 👍 172 ms 67.9 MB
positivity-whnf 🤷 ✋ 108 ms 64.7 MB
proj-maybe-prop 🤷 👍 115 ms 63.9 MB
proj-maybe-prop-past 🤷 👍 114 ms 64.3 MB
proof-param-ok 👍 👍 88.8 ms 62.9 MB
proof-param-swap 🤷 ✋ 101 ms 63.7 MB
subject-reduction-redex 🤷 👍 187 ms 69.6 MB
subject-reduction-reduct 🤷 ✋ 213 ms 71.6 MB
vanishing-occurrence 🤷 👍 91.0 ms 63.0 MB
10 1.12 s 65.5 MB
extra-rec ✋ ✋ 101 ms 64.0 MB
inductive-undeclared-universe ✋ ✋ 96.8 ms 64.2 MB
level-index-out-of-order 👍 👍 90.7 ms 63.5 MB
nat-lit-add 👍 👍 137 ms 65.4 MB
nat-lit-add-bad ✋ ✋ 140 ms 65.5 MB
nat-lit-ble 👍 👍 130 ms 65.2 MB
nat-lit-sub 👍 👍 133 ms 65.3 MB
orphan-ctor ✋ ✋ 94.0 ms 63.6 MB
proj-of-prop ✋ ✋ 107 ms 64.3 MB
sparse-name-index 👍 👍 91.0 ms 63.0 MB
32 2.38 min (+70%) 7.6 GB
app-lam 👍 👍 11.6 s (×2.4) 2.7 GB (+92%)
args-before-unfold 👍 👍 253 ms (×6.3) 73.6 MB (-28%)
beta-ladder 👍 👍 2.31 s (+38%) 602.5 MB (+13%)
church-numerals 👍 👍 297 ms (×5.8) 100.3 MB (-12%)
discarded-argument 👍 👍 466 ms (×2.8) 102.5 MB (+1%)
discarded-argument-match 👍 👍 731 ms (×5.0) 141.4 MB (+37%)
folded-constant-first 👍 👍 270 ms (×6.0) 75.2 MB (-28%)
folded-constant-last 👍 👍 281 ms (×6.2) 75.3 MB (-28%)
fueled-chain 👍 👍 719 ms (×5.4) 131.9 MB (+19%)
gf3-matrix-product 👍 👍 9.82 s (×3.6) 5.0 GB (+40%)
grind-ring-5 👍 👍 3.88 s (+79%) 503.6 MB (+93%)
identical-nesting 👍 👍 107 ms (×3.3) 63.9 MB (-37%)
irrelevance-before-evaluation 👍 👍 120 ms (×3.6) 64.6 MB (-36%)
irrelevance-refutes 👍 👍 121 ms (×3.7) 64.3 MB (-37%)
let-fold 👍 👍 2.24 s (×36) 563.0 MB (×5.5)
let-ladder 👍 👍 1.29 s (+28%) 446.3 MB (+32%)
magma-list-deep-n21 👍 👍 5.03 s (+87%) 1.0 GB (+54%)
magma-list-deep-n36 👍 👍 57.9 s (+64%) 7.6 GB (-2%)
magma-list-pair-n21 👍 👍 19.6 s (+6%) 4.8 GB (+19%)
magma-list-pair-n7 👍 👍 2.59 s (+54%) 601.3 MB (+31%)
magma-string-n4 👍 👍 4.93 s (+38%) 740.0 MB (×4.7)
magma-string-pair-n9 👍 👍 15.0 s (+82%) 2.4 GB (×2.4)
proj-cheap-struct 👍 👍 217 ms (×5.6) 73.8 MB (-27%)
proj-lazy-struct 👍 👍 159 ms (×4.5) 67.9 MB (-33%)
proj-stuck-struct 👍 👍 164 ms (×4.5) 68.1 MB (-33%)
prop-struct-projections 👍 👍 627 ms (×6.0) 127.6 MB (+21%)
refute-cheap-first ✋ ✋ 135 ms (×3.3) 65.4 MB (-36%)
refute-cheap-last ✋ ✋ 633 ms (×3.5) 130.7 MB (+27%)
repeated-subproblem 👍 👍 116 ms (×3.5) 64.7 MB (-36%)
shared-subterm 👍 👍 391 ms (×6.3) 86.8 MB (-20%)
shift-cascade 👍 👍 280 ms (×5.5) 80.4 MB (-22%)
unroll-versus-evaluate 👍 👍 164 ms (×4.6) 68.8 MB (-32%)
141 14.4 s 67.9 MB
001_basicDef 👍 👍 92.6 ms 62.8 MB
002_badDef ✋ ✋ 97.4 ms 63.4 MB
003_arrowType 👍 👍 91.4 ms 63.1 MB
004_dependentType 👍 👍 90.9 ms 63.0 MB
005_constType 👍 👍 91.8 ms 63.3 MB
006_betaReduction 👍 👍 92.5 ms 63.6 MB
007_betaReduction2 👍 👍 93.9 ms 63.2 MB
008_forallSortWhnf 👍 👍 92.3 ms 63.6 MB
009_forallSortBad ✋ ✋ 97.1 ms 63.8 MB
010_nonTypeType ✋ ✋ 97.4 ms 63.7 MB
011_nonTypeAxiom ✋ ✋ 96.8 ms 64.0 MB
012_nonPropThm ✋ ✋ 94.5 ms 63.3 MB
013_thmProof 👍 👍 92.1 ms 63.8 MB
014_selfProof ✋ ✋ 95.1 ms 63.8 MB
015_levelComp1 👍 👍 90.2 ms 63.1 MB
016_levelComp2 👍 👍 89.8 ms 63.5 MB
017_levelComp3 👍 👍 90.2 ms 63.3 MB
018_levelParams 👍 👍 93.4 ms 63.8 MB
019_tut06_bad01 ✋ ✋ 94.1 ms 62.5 MB
020_levelComp4 👍 👍 91.0 ms 63.3 MB
021_levelComp5 👍 👍 90.2 ms 63.3 MB
022_imax1 👍 👍 91.5 ms 63.3 MB
023_imax2 👍 👍 92.4 ms 63.1 MB
024_levelMaxComm 👍 👍 90.2 ms 63.2 MB
025_levelMaxAssoc 👍 👍 91.0 ms 63.1 MB
026_levelMaxIdem 👍 👍 90.5 ms 62.5 MB
027_levelMaxAbsorb 👍 👍 90.4 ms 63.0 MB
028_inferVar 👍 👍 90.8 ms 63.5 MB
029_defEqLambda 👍 👍 93.0 ms 63.8 MB
030_peano1 👍 👍 96.9 ms 63.9 MB
031_peano2 👍 👍 99.6 ms 63.4 MB
032_peano3 👍 👍 94.3 ms 63.6 MB
033_letType 👍 👍 90.0 ms 63.0 MB
034_letTypeDep 👍 👍 93.7 ms 63.4 MB
035_letRed 👍 👍 92.6 ms 63.7 MB
036_empty 👍 👍 97.7 ms 63.7 MB
037_boolType 👍 👍 95.4 ms 64.1 MB
038_twoBool 👍 👍 101 ms 64.0 MB
039_andType 👍 👍 101 ms 63.7 MB
040_prodType 👍 👍 102 ms 64.5 MB
041_pprodType 👍 👍 102 ms 64.1 MB
042_pUnitType 👍 👍 100 ms 63.5 MB
043_eqType 👍 👍 97.3 ms 63.8 MB
044_natDef 👍 👍 101 ms 63.8 MB
045_rbTreeDef 👍 👍 123 ms 64.9 MB
046_inductBadNonSort ✋ ✋ 94.3 ms 63.4 MB
047_inductBadNonSort2 ✋ ✋ 96.6 ms 64.1 MB
048_inductLevelParam ✋ ✋ 99.5 ms 63.2 MB
049_inductTooFewParams ✋ ✋ 94.5 ms 63.6 MB
050_inductWrongCtorParams ✋ ✋ 95.4 ms 64.4 MB
051_inductWrongCtorResParams ✋ ✋ 101 ms 64.0 MB
052_inductWrongCtorResLevel ✋ ✋ 101 ms 63.8 MB
053_inductInIndex ✋ ✋ 99.4 ms 64.0 MB
054_indNeg ✋ ✋ 101 ms 64.2 MB
055_reduceCtorParam.mk 👍 👍 98.8 ms 64.4 MB
056_reduceCtorType.mk ✋ ✋ 98.6 ms 63.7 MB
057_indNegReducible ✋ ✋ 102 ms 63.8 MB
058_predWithTypeField 👍 👍 95.6 ms 63.6 MB
059_typeWithTypeField 👍 👍 94.9 ms 63.4 MB
060_typeWithTypeFieldPoly 👍 👍 99.0 ms 64.1 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 94.9 ms 63.8 MB
062_emptyRec 👍 👍 95.9 ms 64.1 MB
063_boolRec 👍 👍 101 ms 63.3 MB
064_twoBoolRec 👍 👍 105 ms 64.4 MB
065_andRec 👍 👍 103 ms 64.0 MB
066_prodRec 👍 👍 101 ms 64.0 MB
067_pprodRec 👍 👍 103 ms 63.9 MB
068_punitRec 👍 👍 102 ms 63.8 MB
069_eqRec 👍 👍 98.1 ms 63.8 MB
070_nRec 👍 👍 102 ms 63.9 MB
071_rbTreeRef 👍 👍 126 ms 64.9 MB
072_boolPropRec 👍 👍 97.1 ms 63.4 MB
073_BogusRecursor ✋ ✋ 104 ms 64.2 MB
074_existsRec 👍 👍 99.1 ms 63.8 MB
075_typeSingletonRecReduction 👍 👍 108 ms 64.0 MB
076_sortElimPropRec 👍 👍 105 ms 63.4 MB
077_sortElimProp2Rec 👍 👍 104 ms 64.0 MB
078_boolRecEqns 👍 👍 109 ms 64.8 MB
079_prodRecEqns 👍 👍 115 ms 64.2 MB
080_nRecReduction 👍 👍 121 ms 65.0 MB
081_listRecReduction 👍 👍 126 ms 65.3 MB
082_RBTree.id_spec 👍 👍 172 ms 67.9 MB
083_And.right 👍 👍 103 ms 63.8 MB
084_Prod.snd 👍 👍 104 ms 64.0 MB
085_PProd.snd 👍 👍 103 ms 64.0 MB
086_PSigma.snd 👍 👍 103 ms 64.3 MB
087_projOutOfRange ✋ ✋ 106 ms 63.9 MB
088_projNotStruct ✋ ✋ 105 ms 63.6 MB
089_projProp1 👍 👍 113 ms 63.8 MB
090_projProp2 ✋ ✋ 106 ms 64.7 MB
091_projProp3 👍 👍 112 ms 64.5 MB
092_projProp4 ✋ ✋ 113 ms 64.4 MB
093_projProp5 ✋ ✋ 115 ms 64.3 MB
094_projProp6 ✋ ✋ 113 ms 64.1 MB
095_projDataIndexRec 👍 👍 105 ms 63.8 MB
096_projIndexData ✋ ✋ 120 ms 64.6 MB
097_projIndexData2 ✋ ✋ 122 ms 64.7 MB
098_projRed 👍 👍 114 ms 64.5 MB
099_ruleK 👍 👍 103 ms 64.1 MB
100_ruleKbad ✋ ✋ 115 ms 64.8 MB
101_ruleKAcc ✋ ✋ 128 ms 64.9 MB
102_aNatLit 👍 👍 101 ms 64.4 MB
103_natLitEq 👍 👍 101 ms 63.5 MB
104_proofIrrelevance 👍 👍 103 ms 63.9 MB
105_proofIrrelevanceBad ✋ ✋ 109 ms 64.4 MB
106_proofIrrelevanceWhnf 👍 👍 102 ms 64.2 MB
107_proofIrrelevanceUnderBinder 👍 👍 94.4 ms 63.3 MB
108_unitEta1 👍 👍 108 ms 64.3 MB
109_unitEta2 👍 👍 107 ms 64.5 MB
110_unitEta3 👍 👍 107 ms 64.2 MB
111_indexedUnitEta ✋ ✋ 116 ms 65.0 MB
112_structEta 👍 👍 123 ms 64.6 MB
113_indexedStructEta ✋ ✋ 117 ms 64.2 MB
114_funEta 👍 👍 101 ms 63.9 MB
115_funEtaDep 👍 👍 102 ms 63.6 MB
116_funEtaBad ✋ ✋ 109 ms 64.4 MB
117_reflOccLeft ✋ ✋ 106 ms 64.2 MB
118_reflOccInIndex ✋ ✋ 107 ms 64.1 MB
119_reduceCtorParamRefl.mk 👍 👍 100 ms 64.1 MB
120_reduceCtorParamRefl2.mk 👍 👍 94.7 ms 63.6 MB
121_rTreeRec 👍 👍 104 ms 63.9 MB
122_rtreeRecReduction 👍 👍 115 ms 64.6 MB
123_accRecType 👍 👍 110 ms 64.4 MB
124_accRecReduction 👍 👍 118 ms 63.9 MB
125_accRecNoEta ✋ ✋ 128 ms 65.0 MB
126_quotMkType 👍 👍 104 ms 63.8 MB
127_quotIndType 👍 👍 104 ms 64.2 MB
128_quotLiftType 👍 👍 104 ms 63.7 MB
129_quotSoundType 👍 👍 107 ms 63.7 MB
130_quotLiftReduction 👍 👍 108 ms 64.0 MB
131_quotIndReduction 👍 👍 108 ms 63.9 MB
132_dup_defs ✋ ✋ 94.2 ms 63.6 MB
133_dup_ind_def ✋ ✋ 98.2 ms 63.9 MB
134_dup_ctor_def ✋ ✋ 98.0 ms 64.0 MB
135_dup_rec_def ✋ ✋ 101 ms 63.5 MB
136_misnamed_rec_user ✋ ✋ 98.8 ms 63.8 MB
137_dup_rec_def2 ✋ ✋ 102 ms 63.9 MB
138_dup_ctor_rec ✋ ✋ 98.0 ms 64.0 MB
139_DupConCon ✋ ✋ 96.5 ms 64.0 MB
140_falseFromUnsafe ✋ ✋ 101 ms 64.1 MB
141_falseFromPartial ✋ ✋ 101 ms 64.0 MB