Lean Kernel Arena / ind-models

Checker "ind-models"

Language: Lean Lean · Version: 86caadd · 📄 Declaration · 🔗 Source

lean-inductive-models is a Lean 4 NDJSON-to-NDJSON filter and standalone model checker. It adds an ordinary-declaration model of each supported inductive while retaining the original declaration, and structurally checks that the generated models correspond to their source declarations.

In the arena it runs as a checker: the input declarations are replayed through Lean's kernel (--type-check-input), models are generated for all supported inductives and kernel-checked as they are produced, and the structural checker validates the model-to-source correspondence. The transformed output is discarded (--no-output).

Since it is built on the official Lean kernel, it is not an independent kernel implementation. However, by re-deriving each inductive's recursor and reduction behavior from first principles and verifying the result, it can catch a large class of potential implementation bugs in the kernel's handling of inductives.

Soundness (rightfully rejected tests)

92 ✅ 0 ❌ 0 🚫

Completeness (rightfully accepted tests)

148 ✅ 0 ❌ 0 🚫

Corner cases (no outcome prescribed)

28 ✅ 2 🚫

Test Expected Result ⏱️ 🧠
cedar 👍 👍 3.93 min (+60%) 1.1 GB (-23%)
con-leche 👍 👍 5.07 min (+41%) 7.0 GB (0%)
cslib 👍 👍 10.6 min (+12%) 2.7 GB (-22%)
init 👍 👍 72.2 s (+8%) 496.1 MB (-16%)
init-prelude 👍 👍 875 ms (×2.3) 133.5 MB (+34%)
mathlib 👍 👍 36.0 min (+7%) 6.0 GB (-39%)
navier-stokes-euler 👍 👍 13.3 min (+19%) 1.6 GB (-36%)
reachability 👍 👍 24.7 s (+5%) 1.6 GB (+1%)
std 👍 👍 2.05 min (+11%) 759.2 MB (-19%)
34 3.77 s 117.5 MB
closure-level-subst ✋ ✋ 100 ms 100.9 MB
constlevels ✋ ✋ 101 ms 105.2 MB
ctor-num-fields ✋ ✋ 103 ms 95.1 MB
eta-ctor-alias ✋ ✋ 100 ms 95.8 MB
k-rec-conv ✋ ✋ 101 ms 97.2 MB
large-elim-param ✋ ✋ 100 ms 103.0 MB
large-elim-prop-bool ✋ ✋ 101 ms 97.5 MB
level-imax-leq ✋ ✋ 100 ms 104.2 MB
level-imax-normalization ✋ ✋ 100 ms 104.2 MB
loose-bvar-value ✋ ✋ 99.8 ms 102.2 MB
nat-rec-k-lie ✋ ✋ 100 ms 103.0 MB
nat-rec-rules ✋ ✋ 102 ms 106.5 MB
nat-shift-huge 👍 👍 162 ms 114.7 MB
nested-name-capture ✋ ✋ 102 ms 106.9 MB
nested-rec-rule-nfields ✋ ✋ 104 ms 98.2 MB
nested-unused-param ✋ ✋ 105 ms 97.7 MB
open-term-cache-context ✋ ✋ 100 ms 94.4 MB
orphan-rec ✋ ✋ 99.7 ms 103.2 MB
pi-closure-context ✋ ✋ 99.9 ms 104.0 MB
proj-non-structure ✋ ✋ 100 ms 95.8 MB
proj-of-imax-prop ✋ ✋ 101 ms 98.5 MB
proj-of-stuck-prop ✋ ✋ 124 ms 102.0 MB
proj-of-subst-prop ✋ ✋ 123 ms 101.2 MB
quot-bad-type ✋ ✋ 100 ms 107.5 MB
rec-k-lie ✋ ✋ 100 ms 96.5 MB
rec-missing-ih ✋ ✋ 125 ms 109.6 MB
rec-of-subst-prop ✋ ✋ 125 ms 101.6 MB
rec-rule-proof-irrel ✋ ✋ 102 ms 96.6 MB
rec-rule-proof-irrel-nested ✋ ✋ 103 ms 98.2 MB
rec-rule-wrong-arg ✋ ✋ 102 ms 97.3 MB
rec-type-proof-irrel ✋ ✋ 103 ms 96.9 MB
str-lit-utf8 👍 👍 210 ms 117.5 MB
str-lit-utf8-bad ✋ ✋ 169 ms 114.2 MB
unit-rec-rule ✋ ✋ 100 ms 103.7 MB
1 3.18 s 104.7 MB
alg-conv-trans-acc 🤷 ✋ 107 ms 98.2 MB
alg-conv-trans-acc-left 🤷 👍 128 ms 100.1 MB
alg-conv-trans-acc-right 🤷 👍 129 ms 100.9 MB
alg-conv-trans-quot 🤷 ✋ 102 ms 96.3 MB
alg-conv-trans-quot-left 🤷 ✋ 102 ms 96.1 MB
alg-conv-trans-quot-left-def 🤷 👍 101 ms 97.5 MB
alg-conv-trans-quot-right 🤷 👍 101 ms 94.7 MB
eta-ctor 🤷 ✋ 101 ms 97.5 MB
eta-rec-struct 🤷 ✋ 101 ms 96.1 MB
eta-rule-k 🤷 ✋ 101 ms 97.4 MB
eta-struct-major-and 🤷 ✋ 101 ms 95.9 MB
eta-struct-major-and-no-whnf 🤷 ⌛ — —
eta-struct-major-no-whnf 🤷 ⌛ — —
eta-unit-like-nested 🤷 ✋ 101 ms 98.9 MB
eta-unit-like-pi 🤷 ✋ 100 ms 96.6 MB
eta-unit-like-proof-field 🤷 ✋ 100 ms 96.0 MB
eta-unit-like-struct 🤷 ✋ 100 ms 96.7 MB
imax-nested-absorption 🤷 ✋ 99.8 ms 94.7 MB
imax-right-successor 🤷 ✋ 99.8 ms 95.0 MB
large-elim-maybe-prop 🤷 ✋ 99.9 ms 102.6 MB
let-value-type-mismatch 🤷 ✋ 99.7 ms 102.2 MB
nested-nonuniform-param 🤷 ✋ 100 ms 95.3 MB
nested-redex-aux 🤷 👍 251 ms 104.7 MB
positivity-whnf 🤷 ✋ 100 ms 103.0 MB
proj-maybe-prop 🤷 👍 105 ms 98.5 MB
proj-maybe-prop-past 🤷 👍 105 ms 97.8 MB
proof-param-ok 👍 👍 103 ms 104.7 MB
proof-param-swap 🤷 ✋ 99.8 ms 102.6 MB
subject-reduction-redex 🤷 👍 128 ms 101.1 MB
subject-reduction-reduct 🤷 ✋ 106 ms 98.3 MB
vanishing-occurrence 🤷 👍 105 ms 96.6 MB
10 1.03 s 103.9 MB
extra-rec ✋ ✋ 99.7 ms 103.9 MB
inductive-undeclared-universe ✋ ✋ 99.8 ms 103.0 MB
level-index-out-of-order 👍 👍 99.7 ms 103.0 MB
nat-lit-add 👍 👍 108 ms 99.8 MB
nat-lit-add-bad ✋ ✋ 102 ms 98.6 MB
nat-lit-ble 👍 👍 109 ms 99.3 MB
nat-lit-sub 👍 👍 108 ms 99.6 MB
orphan-ctor ✋ ✋ 99.7 ms 102.4 MB
proj-of-prop ✋ ✋ 100 ms 95.9 MB
sparse-name-index 👍 👍 99.7 ms 102.6 MB
45 3.77 min (+9%) 7.8 GB
app-lam 👍 👍 4.93 s (+1%) 1.4 GB (+1%)
args-before-unfold 👍 👍 112 ms (×2.8) 109.3 MB (+19%)
beta-ladder 👍 👍 1.74 s (+4%) 541.2 MB (+3%)
church-numerals 👍 👍 119 ms (×2.3) 116.6 MB (+12%)
discarded-argument 👍 👍 240 ms (+42%) 108.8 MB (+19%)
discarded-argument-match 👍 👍 220 ms (+50%) 109.9 MB (+17%)
folded-constant-first 👍 👍 121 ms (×2.7) 112.3 MB (+19%)
folded-constant-last 👍 👍 121 ms (×2.7) 113.5 MB (+20%)
fueled-chain 👍 👍 247 ms (+85%) 120.1 MB (+18%)
gf3-matrix-product 👍 👍 1.94 s (+7%) 3.6 GB (0%)
grind-ring-5 👍 👍 2.95 s (+35%) 272.8 MB (+8%)
identical-nesting 👍 👍 104 ms (×3.2) 106.9 MB (+17%)
irrelevance-before-evaluation 👍 👍 105 ms (×3.2) 110.1 MB (+20%)
irrelevance-refutes 👍 👍 102 ms (×3.1) 109.0 MB (+19%)
ite-taken-branch 👍 👍 19.8 s (+2%) 1.7 GB (0%)
ite-taken-branch-bad ✋ ✋ 6.80 s (0%) 1.7 GB (+1%)
let-fold 👍 👍 162 ms (×2.6) 114.3 MB (+21%)
let-ladder 👍 👍 1.08 s (+7%) 345.7 MB (+5%)
loop-unfolded-once 👍 👍 868 ms (+65%) 135.5 MB (+33%)
loop-unfolded-once-bad ✋ ✋ 14.3 s (0%) 128.7 MB (+24%)
magma-list-deep-n21 👍 👍 2.83 s (+5%) 704.5 MB (+2%)
magma-list-deep-n36 👍 👍 35.3 s (0%) 7.8 GB (0%)
magma-list-pair-n21 👍 👍 18.6 s (0%) 4.0 GB (0%)
magma-list-pair-n7 👍 👍 1.82 s (+6%) 462.3 MB (+2%)
magma-string-n4 👍 👍 4.17 s (+17%) 156.7 MB (+5%)
magma-string-pair-n9 👍 👍 8.80 s (+7%) 1024.0 MB (+2%)
proj-app-lazy-delta 👍 👍 2.14 s (+3%) 628.0 MB (+3%)
proj-applied-struct 👍 👍 14.0 s (0%) 1.4 GB (+1%)
proj-applied-struct-arg-bad ✋ ✋ 4.73 s (+1%) 1.4 GB (+1%)
proj-applied-struct-bad ✋ ✋ 4.90 s (+1%) 1.4 GB (+1%)
proj-cheap-struct 👍 👍 124 ms (×3.2) 111.8 MB (+21%)
proj-lazy-struct 👍 👍 113 ms (×3.2) 107.0 MB (+16%)
proj-stuck-struct 👍 👍 114 ms (×3.2) 111.5 MB (+21%)
prop-struct-projections 👍 👍 13.4 s (×129) 151.5 MB (+57%)
refute-cheap-first ✋ ✋ 109 ms (×2.6) 109.7 MB (+17%)
refute-cheap-last ✋ ✋ 248 ms (+37%) 108.1 MB (+16%)
repeated-subproblem 👍 👍 193 ms (×5.9) 114.0 MB (+24%)
shared-subterm 👍 👍 222 ms (×3.6) 114.8 MB (+16%)
shift-cascade 👍 👍 120 ms (×2.4) 115.0 MB (+22%)
short-circuit-and 👍 👍 17.9 s (+2%) 1.5 GB (+1%)
short-circuit-and-bad ✋ ✋ 6.22 s (+1%) 1.5 GB (+1%)
unfold-before-literal 👍 👍 14.5 s (0%) 1.4 GB (+1%)
unfold-before-literal-bad ✋ ✋ 4.89 s (0%) 1.4 GB (+1%)
unfold-before-literal-fallback 👍 👍 14.5 s (0%) 1.4 GB (+1%)
unroll-versus-evaluate 👍 👍 107 ms (×3.0) 113.5 MB (+23%)
141 14.8 s 105.1 MB
001_basicDef 👍 👍 99.7 ms 95.8 MB
002_badDef ✋ ✋ 99.7 ms 96.3 MB
003_arrowType 👍 👍 99.7 ms 94.3 MB
004_dependentType 👍 👍 99.7 ms 94.8 MB
005_constType 👍 👍 99.7 ms 94.1 MB
006_betaReduction 👍 👍 99.7 ms 94.7 MB
007_betaReduction2 👍 👍 99.7 ms 95.8 MB
008_forallSortWhnf 👍 👍 99.7 ms 95.9 MB
009_forallSortBad ✋ ✋ 99.8 ms 97.1 MB
010_nonTypeType ✋ ✋ 99.7 ms 96.6 MB
011_nonTypeAxiom ✋ ✋ 99.7 ms 96.5 MB
012_nonPropThm ✋ ✋ 99.7 ms 96.5 MB
013_thmProof 👍 👍 99.8 ms 95.1 MB
014_selfProof ✋ ✋ 99.7 ms 94.6 MB
015_levelComp1 👍 👍 99.7 ms 94.7 MB
016_levelComp2 👍 👍 99.7 ms 94.1 MB
017_levelComp3 👍 👍 99.7 ms 94.4 MB
018_levelParams 👍 👍 99.7 ms 95.7 MB
019_tut06_bad01 ✋ ✋ 99.7 ms 95.3 MB
020_levelComp4 👍 👍 99.7 ms 94.1 MB
021_levelComp5 👍 👍 99.7 ms 94.7 MB
022_imax1 👍 👍 99.7 ms 94.4 MB
023_imax2 👍 👍 99.7 ms 95.4 MB
024_levelMaxComm 👍 👍 99.7 ms 95.2 MB
025_levelMaxAssoc 👍 👍 99.7 ms 94.4 MB
026_levelMaxIdem 👍 👍 99.7 ms 93.9 MB
027_levelMaxAbsorb 👍 👍 99.7 ms 94.3 MB
028_inferVar 👍 👍 99.7 ms 95.4 MB
029_defEqLambda 👍 👍 99.7 ms 94.5 MB
030_peano1 👍 👍 100 ms 95.6 MB
031_peano2 👍 👍 100 ms 94.4 MB
032_peano3 👍 👍 100 ms 95.6 MB
033_letType 👍 👍 99.7 ms 95.4 MB
034_letTypeDep 👍 👍 99.7 ms 94.4 MB
035_letRed 👍 👍 99.7 ms 94.9 MB
036_empty 👍 👍 102 ms 96.6 MB
037_boolType 👍 👍 103 ms 96.3 MB
038_twoBool 👍 👍 105 ms 96.7 MB
039_andType 👍 👍 101 ms 98.1 MB
040_prodType 👍 👍 104 ms 97.8 MB
041_pprodType 👍 👍 105 ms 97.9 MB
042_pUnitType 👍 👍 99.9 ms 94.3 MB
043_eqType 👍 👍 100 ms 94.6 MB
044_natDef 👍 👍 104 ms 96.4 MB
045_rbTreeDef 👍 👍 216 ms 105.1 MB
046_inductBadNonSort ✋ ✋ 99.8 ms 95.4 MB
047_inductBadNonSort2 ✋ ✋ 99.7 ms 95.4 MB
048_inductLevelParam ✋ ✋ 99.7 ms 96.0 MB
049_inductTooFewParams ✋ ✋ 99.7 ms 94.7 MB
050_inductWrongCtorParams ✋ ✋ 99.7 ms 95.2 MB
051_inductWrongCtorResParams ✋ ✋ 99.7 ms 94.8 MB
052_inductWrongCtorResLevel ✋ ✋ 99.8 ms 95.7 MB
053_inductInIndex ✋ ✋ 99.7 ms 96.0 MB
054_indNeg ✋ ✋ 99.7 ms 95.1 MB
055_reduceCtorParam.mk 👍 👍 103 ms 96.3 MB
056_reduceCtorType.mk ✋ ✋ 99.8 ms 95.0 MB
057_indNegReducible ✋ ✋ 99.8 ms 96.6 MB
058_predWithTypeField 👍 👍 100 ms 96.7 MB
059_typeWithTypeField 👍 👍 101 ms 96.3 MB
060_typeWithTypeFieldPoly 👍 👍 101 ms 96.9 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 99.7 ms 96.3 MB
062_emptyRec 👍 👍 102 ms 97.4 MB
063_boolRec 👍 👍 103 ms 97.9 MB
064_twoBoolRec 👍 👍 105 ms 97.1 MB
065_andRec 👍 👍 101 ms 96.9 MB
066_prodRec 👍 👍 104 ms 96.6 MB
067_pprodRec 👍 👍 105 ms 97.7 MB
068_punitRec 👍 👍 99.9 ms 94.6 MB
069_eqRec 👍 👍 100 ms 94.9 MB
070_nRec 👍 👍 104 ms 97.0 MB
071_rbTreeRef 👍 👍 216 ms 103.6 MB
072_boolPropRec 👍 👍 101 ms 95.9 MB
073_BogusRecursor ✋ ✋ 99.8 ms 96.4 MB
074_existsRec 👍 👍 101 ms 96.6 MB
075_typeSingletonRecReduction 👍 👍 104 ms 97.8 MB
076_sortElimPropRec 👍 👍 104 ms 96.9 MB
077_sortElimProp2Rec 👍 👍 104 ms 98.3 MB
078_boolRecEqns 👍 👍 105 ms 100.5 MB
079_prodRecEqns 👍 👍 105 ms 100.5 MB
080_nRecReduction 👍 👍 106 ms 101.2 MB
081_listRecReduction 👍 👍 109 ms 100.6 MB
082_RBTree.id_spec 👍 👍 220 ms 103.8 MB
083_And.right 👍 👍 101 ms 96.4 MB
084_Prod.snd 👍 👍 104 ms 96.6 MB
085_PProd.snd 👍 👍 105 ms 97.8 MB
086_PSigma.snd 👍 👍 105 ms 96.5 MB
087_projOutOfRange ✋ ✋ 100 ms 96.4 MB
088_projNotStruct ✋ ✋ 99.9 ms 96.8 MB
089_projProp1 👍 👍 102 ms 95.9 MB
090_projProp2 ✋ ✋ 100 ms 96.1 MB
091_projProp3 👍 👍 102 ms 97.3 MB
092_projProp4 ✋ ✋ 100 ms 96.6 MB
093_projProp5 ✋ ✋ 100 ms 96.3 MB
094_projProp6 ✋ ✋ 100 ms 95.8 MB
095_projDataIndexRec 👍 👍 105 ms 97.9 MB
096_projIndexData ✋ ✋ 101 ms 98.2 MB
097_projIndexData2 ✋ ✋ 101 ms 98.0 MB
098_projRed 👍 👍 106 ms 97.0 MB
099_ruleK 👍 👍 103 ms 96.1 MB
100_ruleKbad ✋ ✋ 101 ms 96.1 MB
101_ruleKAcc ✋ ✋ 102 ms 97.7 MB
102_aNatLit 👍 👍 100 ms 94.6 MB
103_natLitEq 👍 👍 100 ms 95.2 MB
104_proofIrrelevance 👍 👍 100 ms 94.6 MB
105_proofIrrelevanceBad ✋ ✋ 100 ms 96.1 MB
106_proofIrrelevanceWhnf 👍 👍 100 ms 94.3 MB
107_proofIrrelevanceUnderBinder 👍 👍 99.8 ms 95.2 MB
108_unitEta1 👍 👍 100 ms 95.3 MB
109_unitEta2 👍 👍 100 ms 95.7 MB
110_unitEta3 👍 👍 100 ms 94.2 MB
111_indexedUnitEta ✋ ✋ 101 ms 96.4 MB
112_structEta 👍 👍 107 ms 99.4 MB
113_indexedStructEta ✋ ✋ 101 ms 95.9 MB
114_funEta 👍 👍 100 ms 94.4 MB
115_funEtaDep 👍 👍 100 ms 95.6 MB
116_funEtaBad ✋ ✋ 101 ms 95.7 MB
117_reflOccLeft ✋ ✋ 99.9 ms 95.2 MB
118_reflOccInIndex ✋ ✋ 100 ms 96.5 MB
119_reduceCtorParamRefl.mk 👍 👍 190 ms 102.1 MB
120_reduceCtorParamRefl2.mk 👍 👍 190 ms 100.7 MB
121_rTreeRec 👍 👍 191 ms 100.6 MB
122_rtreeRecReduction 👍 👍 192 ms 103.3 MB
123_accRecType 👍 👍 110 ms 97.8 MB
124_accRecReduction 👍 👍 112 ms 99.8 MB
125_accRecNoEta ✋ ✋ 102 ms 99.3 MB
126_quotMkType 👍 👍 100 ms 94.6 MB
127_quotIndType 👍 👍 100 ms 95.4 MB
128_quotLiftType 👍 👍 100 ms 94.5 MB
129_quotSoundType 👍 👍 100 ms 95.6 MB
130_quotLiftReduction 👍 👍 101 ms 95.2 MB
131_quotIndReduction 👍 👍 101 ms 95.2 MB
132_dup_defs ✋ ✋ 67.9 ms 94.4 MB
133_dup_ind_def ✋ ✋ 68.0 ms 94.4 MB
134_dup_ctor_def ✋ ✋ 68.0 ms 93.4 MB
135_dup_rec_def ✋ ✋ 68.0 ms 93.6 MB
136_misnamed_rec_user ✋ ✋ 99.8 ms 96.1 MB
137_dup_rec_def2 ✋ ✋ 99.8 ms 96.4 MB
138_dup_ctor_rec ✋ ✋ 68.0 ms 95.4 MB
139_DupConCon ✋ ✋ 68.0 ms 94.4 MB
140_falseFromUnsafe ✋ ✋ 99.7 ms 96.1 MB
141_falseFromPartial ✋ ✋ 99.7 ms 95.8 MB