Lean Kernel Arena / pestka

Checker "pestka"

Version: 7caa557 · 📄 Declaration · 🔗 Source

Pestka is a type checker for Lean 4 exports written in Aver, a statically typed language designed for AI to write and humans to review, which compiles to Rust. It implements Lean's type theory on its own (universe levels, definitional equality, inductive types with their recursors, quotients, and the Nat and String literal extensions), following the reference kernel's substitution-based algorithm, without NbE, to see how far that algorithm can be pushed. It was written by an AI agent under human guidance.

Declarations are checked on one worker, which keeps what it finds from one declaration to the next, and checks them grouped by namespace so that this is reused while still warm. A free variable is named by its type, value and how many of its kind are open, so a binder opened again gets the same variable and what was found under it holds again. Proof arguments of one constant are not compared. Weak head normalization runs a lazy machine that unfolds a matcher into its callers once and goes from a casesOn straight to its branch. A recursive definition that keeps unfolding gets a rule, derived once by reducing it on fresh variables, which later calls take instead of unfolding it.

The build installs the Aver release pinned in .aver-version from crates.io and builds Pestka for one thread with a profile from checking Init. The same source compiled to WebAssembly is the pestka-wasm entry.

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 👍 👍 20.8 s (÷6.8) 1.4 GB (+6%)
con-leche 👍 👍 14.0 s (÷7.9) 1.2 GB (+48%)
cslib 👍 👍 67.5 s (÷7.7) 3.5 GB (+3%)
init 👍 👍 8.59 s (÷7.7) 924.0 MB (+63%)
init-prelude 👍 👍 64.9 ms (÷5.6) 32.6 MB (÷2.3)
mathlib 👍 👍 3.57 min (÷9.0) 6.4 GB (-35%)
navier-stokes-euler 👍 👍 52.9 s (÷13) 3.4 GB (+37%)
reachability 👍 👍 3.89 s (÷6.0) 337.9 MB (÷5.0)
std 👍 👍 14.8 s (÷7.6) 1.3 GB (+38%)
26 43.7 ms 16.8 MB
closure-level-subst ✋ ✋ 0.725 ms 10.4 MB
constlevels ✋ ✋ 0.969 ms 10.7 MB
ctor-num-fields ✋ ✋ 1.13 ms 10.6 MB
eta-ctor-alias ✋ ✋ 0.848 ms 10.7 MB
forged-quot-ind ✋ ✋ 0.917 ms 10.5 MB
k-rec-conv ✋ ✋ 0.948 ms 10.6 MB
large-elim-param ✋ ✋ 0.896 ms 10.6 MB
large-elim-prop-bool ✋ ✋ 1.03 ms 10.7 MB
level-imax-leq ✋ ✋ 0.800 ms 10.6 MB
level-imax-normalization ✋ ✋ 0.846 ms 10.4 MB
loose-bvar-value ✋ ✋ 0.711 ms 10.6 MB
nat-rec-k-lie ✋ ✋ 0.791 ms 10.6 MB
nat-rec-rules ✋ ✋ 0.860 ms 10.5 MB
nested-name-capture ✋ ✋ 1.29 ms 10.8 MB
nested-rec-rule-nfields ✋ ✋ 1.46 ms 10.5 MB
nested-unused-param ✋ ✋ 2.06 ms 12.7 MB
orphan-rec ✋ ✋ 0.702 ms 10.5 MB
pi-closure-context ✋ ✋ 0.695 ms 10.5 MB
proj-non-structure ✋ ✋ 0.799 ms 10.6 MB
proj-of-imax-prop ✋ ✋ 1.06 ms 10.5 MB
proj-of-stuck-prop ✋ ✋ 5.49 ms 16.8 MB
proj-of-subst-prop ✋ ✋ 5.62 ms 14.7 MB
rec-k-lie ✋ ✋ 0.764 ms 10.5 MB
rec-missing-ih ✋ ✋ 5.70 ms 16.6 MB
rec-of-subst-prop ✋ ✋ 5.90 ms 14.8 MB
unit-rec-rule ✋ ✋ 0.733 ms 10.6 MB
1 34.2 ms 12.8 MB
alg-conv-trans-acc 🤷 ✋ 2.20 ms 12.8 MB
alg-conv-trans-acc-left 🤷 👍 2.16 ms 12.7 MB
alg-conv-trans-acc-right 🤷 👍 2.20 ms 12.7 MB
alg-conv-trans-quot 🤷 ✋ 0.832 ms 10.6 MB
alg-conv-trans-quot-left 🤷 ✋ 0.839 ms 10.7 MB
alg-conv-trans-quot-left-def 🤷 👍 0.859 ms 10.7 MB
alg-conv-trans-quot-right 🤷 👍 0.834 ms 10.6 MB
eta-ctor 🤷 ✋ 0.893 ms 10.8 MB
eta-rec-struct 🤷 ✋ 0.901 ms 10.5 MB
eta-rule-k 🤷 ✋ 0.820 ms 10.7 MB
eta-struct-major-and 🤷 👍 0.867 ms 10.6 MB
eta-struct-major-and-no-whnf 🤷 👍 1.17 ms 10.7 MB
eta-struct-major-no-whnf 🤷 👍 1.35 ms 10.6 MB
eta-unit-like-nested 🤷 ✋ 1.07 ms 10.7 MB
eta-unit-like-pi 🤷 ✋ 0.800 ms 10.7 MB
eta-unit-like-proof-field 🤷 ✋ 0.832 ms 10.8 MB
eta-unit-like-struct 🤷 ✋ 0.838 ms 10.7 MB
imax-nested-absorption 🤷 ✋ 0.685 ms 10.1 MB
imax-right-successor 🤷 👍 0.690 ms 10.1 MB
large-elim-maybe-prop 🤷 ✋ 0.734 ms 10.4 MB
let-value-type-mismatch 🤷 ✋ 0.680 ms 10.3 MB
nested-nonuniform-param 🤷 ✋ 0.847 ms 10.5 MB
nested-redex-aux 🤷 👍 1.98 ms 10.8 MB
positivity-whnf 🤷 ✋ 0.757 ms 10.5 MB
proj-maybe-prop 🤷 👍 0.886 ms 10.4 MB
proj-maybe-prop-past 🤷 👍 0.887 ms 10.5 MB
proof-param-ok 👍 👍 0.736 ms 10.7 MB
proof-param-swap 🤷 ✋ 0.704 ms 10.3 MB
subject-reduction-redex 🤷 👍 2.16 ms 12.6 MB
subject-reduction-reduct 🤷 ✋ 2.15 ms 12.7 MB
vanishing-occurrence 🤷 👍 0.857 ms 10.6 MB
10 9.21 ms 10.8 MB
extra-rec ✋ ✋ 0.702 ms 10.4 MB
inductive-undeclared-universe ✋ ✋ 0.735 ms 10.5 MB
level-index-out-of-order 👍 👍 0.679 ms 10.0 MB
nat-lit-add 👍 👍 1.20 ms 10.8 MB
nat-lit-add-bad ✋ ✋ 1.21 ms 10.7 MB
nat-lit-ble 👍 👍 1.27 ms 10.6 MB
nat-lit-sub 👍 👍 1.26 ms 10.5 MB
orphan-ctor ✋ ✋ 0.701 ms 10.6 MB
proj-of-prop ✋ ✋ 0.778 ms 10.7 MB
sparse-name-index 👍 👍 0.678 ms 10.0 MB
31 8.33 s (÷9.7) 955.0 MB
app-lam 👍 👍 183 ms (÷27) 123.7 MB (÷12)
args-before-unfold 👍 👍 3.73 ms (÷9.7) 14.2 MB (÷4.6)
beta-ladder 👍 👍 50.4 ms (÷33) 42.1 MB (÷12)
church-numerals 👍 👍 11.5 ms (÷4.1) 34.5 MB (÷2.3)
discarded-argument 👍 👍 0.927 ms (÷179) 10.7 MB (÷6.1)
discarded-argument-match 👍 👍 1.20 ms (÷118) 10.9 MB (÷6.2)
folded-constant-first 👍 👍 4.32 ms (÷9.4) 14.2 MB (÷4.8)
folded-constant-last 👍 👍 4.31 ms (÷9.4) 14.1 MB (÷4.9)
fueled-chain 👍 👍 18.9 ms (÷6.7) 22.8 MB (÷3.3)
grind-ring-5 👍 👍 540 ms (÷4.0) 89.2 MB (÷2.6)
identical-nesting 👍 👍 0.845 ms (÷33) 10.5 MB (÷6.3)
irrelevance-before-evaluation 👍 👍 0.967 ms (÷30) 10.7 MB (÷6.1)
irrelevance-refutes 👍 👍 0.939 ms (÷30) 10.7 MB (÷6.2)
let-fold 👍 👍 6.88 ms (÷8.4) 16.5 MB (÷4.0)
let-ladder 👍 👍 48.5 ms (÷21) 46.0 MB (÷6.9)
magma-list-deep-n21 👍 👍 128 ms (÷21) 25.2 MB (÷26)
magma-list-deep-n36 👍 👍 1.26 s (÷28) 38.4 MB (÷209)
magma-list-pair-n21 👍 👍 4.04 s (÷4.6) 955.0 MB (÷4.3)
magma-list-pair-n7 👍 👍 316 ms (÷5.3) 98.9 MB (÷4.3)
magma-string-n4 👍 👍 548 ms (÷6.5) 133.3 MB (+10%)
magma-string-pair-n9 👍 👍 1.05 s (÷7.8) 221.6 MB (÷4.5)
proj-cheap-struct 👍 👍 2.35 ms (÷15) 12.8 MB (÷5.1)
proj-lazy-struct 👍 👍 1.59 ms (÷20) 10.6 MB (÷6.2)
proj-stuck-struct 👍 👍 1.68 ms (÷19) 10.5 MB (÷6.2)
prop-struct-projections 👍 👍 29.5 ms (÷3.4) 18.8 MB (÷3.7)
refute-cheap-first ✋ ✋ 1.06 ms (÷39) 10.8 MB (÷6.4)
refute-cheap-last ✋ ✋ 9.49 ms (÷19) 10.9 MB (÷6.3)
repeated-subproblem 👍 👍 0.971 ms (÷29) 10.6 MB (÷6.2)
shared-subterm 👍 👍 45.7 ms (-21%) 16.6 MB (÷4.4)
shift-cascade 👍 👍 21.2 ms (÷2.2) 17.1 MB (÷4.0)
unroll-versus-evaluate 👍 👍 1.26 ms (÷25) 13.4 MB (÷4.9)
141 109 ms 10.9 MB
001_basicDef 👍 👍 0.678 ms 10.2 MB
002_badDef ✋ ✋ 0.678 ms 10.3 MB
003_arrowType 👍 👍 0.680 ms 10.2 MB
004_dependentType 👍 👍 0.679 ms 10.3 MB
005_constType 👍 👍 0.682 ms 10.1 MB
006_betaReduction 👍 👍 0.689 ms 10.4 MB
007_betaReduction2 👍 👍 0.690 ms 10.5 MB
008_forallSortWhnf 👍 👍 0.689 ms 10.4 MB
009_forallSortBad ✋ ✋ 0.690 ms 10.5 MB
010_nonTypeType ✋ ✋ 0.685 ms 10.2 MB
011_nonTypeAxiom ✋ ✋ 0.685 ms 10.6 MB
012_nonPropThm ✋ ✋ 0.678 ms 10.3 MB
013_thmProof 👍 👍 0.689 ms 10.4 MB
014_selfProof ✋ ✋ 0.679 ms 10.3 MB
015_levelComp1 👍 👍 0.679 ms 10.3 MB
016_levelComp2 👍 👍 0.679 ms 10.3 MB
017_levelComp3 👍 👍 0.680 ms 10.2 MB
018_levelParams 👍 👍 0.691 ms 10.3 MB
019_tut06_bad01 ✋ ✋ 0.677 ms 10.1 MB
020_levelComp4 👍 👍 0.679 ms 10.3 MB
021_levelComp5 👍 👍 0.679 ms 10.3 MB
022_imax1 👍 👍 0.682 ms 10.4 MB
023_imax2 👍 👍 0.683 ms 10.3 MB
024_levelMaxComm 👍 👍 0.683 ms 10.2 MB
025_levelMaxAssoc 👍 👍 0.690 ms 10.3 MB
026_levelMaxIdem 👍 👍 0.681 ms 10.4 MB
027_levelMaxAbsorb 👍 👍 0.684 ms 10.2 MB
028_inferVar 👍 👍 0.681 ms 10.3 MB
029_defEqLambda 👍 👍 0.689 ms 10.3 MB
030_peano1 👍 👍 0.724 ms 10.4 MB
031_peano2 👍 👍 0.751 ms 10.5 MB
032_peano3 👍 👍 0.774 ms 10.6 MB
033_letType 👍 👍 0.680 ms 10.3 MB
034_letTypeDep 👍 👍 0.691 ms 10.4 MB
035_letRed 👍 👍 0.683 ms 10.5 MB
036_empty 👍 👍 0.700 ms 10.6 MB
037_boolType 👍 👍 0.728 ms 10.5 MB
038_twoBool 👍 👍 0.776 ms 10.5 MB
039_andType 👍 👍 0.747 ms 10.5 MB
040_prodType 👍 👍 0.763 ms 10.7 MB
041_pprodType 👍 👍 0.767 ms 10.6 MB
042_pUnitType 👍 👍 0.719 ms 10.5 MB
043_eqType 👍 👍 0.749 ms 10.4 MB
044_natDef 👍 👍 0.746 ms 10.5 MB
045_rbTreeDef 👍 👍 1.08 ms 10.5 MB
046_inductBadNonSort ✋ ✋ 0.690 ms 10.5 MB
047_inductBadNonSort2 ✋ ✋ 0.686 ms 10.5 MB
048_inductLevelParam ✋ ✋ 0.681 ms 10.0 MB
049_inductTooFewParams ✋ ✋ 0.683 ms 10.5 MB
050_inductWrongCtorParams ✋ ✋ 0.695 ms 10.3 MB
051_inductWrongCtorResParams ✋ ✋ 0.693 ms 10.4 MB
052_inductWrongCtorResLevel ✋ ✋ 0.696 ms 10.4 MB
053_inductInIndex ✋ ✋ 0.698 ms 10.6 MB
054_indNeg ✋ ✋ 0.695 ms 10.5 MB
055_reduceCtorParam.mk 👍 👍 0.764 ms 10.6 MB
056_reduceCtorType.mk ✋ ✋ 0.703 ms 10.3 MB
057_indNegReducible ✋ ✋ 0.709 ms 10.4 MB
058_predWithTypeField 👍 👍 0.720 ms 10.6 MB
059_typeWithTypeField 👍 👍 0.723 ms 10.6 MB
060_typeWithTypeFieldPoly 👍 👍 0.727 ms 10.5 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 0.693 ms 10.5 MB
062_emptyRec 👍 👍 0.703 ms 10.5 MB
063_boolRec 👍 👍 0.739 ms 10.7 MB
064_twoBoolRec 👍 👍 0.786 ms 10.5 MB
065_andRec 👍 👍 0.754 ms 10.7 MB
066_prodRec 👍 👍 0.773 ms 10.5 MB
067_pprodRec 👍 👍 0.778 ms 10.7 MB
068_punitRec 👍 👍 0.725 ms 10.5 MB
069_eqRec 👍 👍 0.755 ms 10.7 MB
070_nRec 👍 👍 0.751 ms 10.8 MB
071_rbTreeRef 👍 👍 1.11 ms 10.7 MB
072_boolPropRec 👍 👍 0.729 ms 10.6 MB
073_BogusRecursor ✋ ✋ 0.728 ms 10.6 MB
074_existsRec 👍 👍 0.766 ms 10.6 MB
075_typeSingletonRecReduction 👍 👍 0.851 ms 10.6 MB
076_sortElimPropRec 👍 👍 0.814 ms 10.6 MB
077_sortElimProp2Rec 👍 👍 0.829 ms 10.7 MB
078_boolRecEqns 👍 👍 0.908 ms 10.6 MB
079_prodRecEqns 👍 👍 0.877 ms 10.7 MB
080_nRecReduction 👍 👍 0.952 ms 10.5 MB
081_listRecReduction 👍 👍 1.04 ms 10.5 MB
082_RBTree.id_spec 👍 👍 1.69 ms 10.6 MB
083_And.right 👍 👍 0.762 ms 10.8 MB
084_Prod.snd 👍 👍 0.776 ms 10.6 MB
085_PProd.snd 👍 👍 0.780 ms 10.6 MB
086_PSigma.snd 👍 👍 0.793 ms 10.9 MB
087_projOutOfRange ✋ ✋ 0.756 ms 10.5 MB
088_projNotStruct ✋ ✋ 0.751 ms 10.6 MB
089_projProp1 👍 👍 0.883 ms 10.5 MB
090_projProp2 ✋ ✋ 0.886 ms 10.7 MB
091_projProp3 👍 👍 0.883 ms 10.4 MB
092_projProp4 ✋ ✋ 0.885 ms 10.5 MB
093_projProp5 ✋ ✋ 0.888 ms 10.4 MB
094_projProp6 ✋ ✋ 0.886 ms 10.7 MB
095_projDataIndexRec 👍 👍 0.838 ms 10.6 MB
096_projIndexData ✋ ✋ 1.03 ms 10.7 MB
097_projIndexData2 ✋ ✋ 1.03 ms 10.6 MB
098_projRed 👍 👍 0.902 ms 10.7 MB
099_ruleK 👍 👍 0.817 ms 10.8 MB
100_ruleKbad ✋ ✋ 0.823 ms 10.6 MB
101_ruleKAcc ✋ ✋ 0.976 ms 10.5 MB
102_aNatLit 👍 👍 0.746 ms 10.7 MB
103_natLitEq 👍 👍 0.819 ms 10.7 MB
104_proofIrrelevance 👍 👍 0.769 ms 10.7 MB
105_proofIrrelevanceBad ✋ ✋ 0.769 ms 10.8 MB
106_proofIrrelevanceWhnf 👍 👍 0.777 ms 10.7 MB
107_proofIrrelevanceUnderBinder 👍 👍 0.705 ms 10.4 MB
108_unitEta1 👍 👍 0.807 ms 10.5 MB
109_unitEta2 👍 👍 0.802 ms 10.8 MB
110_unitEta3 👍 👍 0.803 ms 10.7 MB
111_indexedUnitEta ✋ ✋ 0.846 ms 10.5 MB
112_structEta 👍 👍 0.953 ms 10.8 MB
113_indexedStructEta ✋ ✋ 0.887 ms 10.7 MB
114_funEta 👍 👍 0.772 ms 10.7 MB
115_funEtaDep 👍 👍 0.774 ms 10.6 MB
116_funEtaBad ✋ ✋ 0.770 ms 10.7 MB
117_reflOccLeft ✋ ✋ 0.765 ms 10.5 MB
118_reflOccInIndex ✋ ✋ 0.768 ms 10.7 MB
119_reduceCtorParamRefl.mk 👍 👍 0.776 ms 10.7 MB
120_reduceCtorParamRefl2.mk 👍 👍 0.775 ms 10.5 MB
121_rTreeRec 👍 👍 0.810 ms 10.6 MB
122_rtreeRecReduction 👍 👍 0.909 ms 10.6 MB
123_accRecType 👍 👍 0.846 ms 10.7 MB
124_accRecReduction 👍 👍 0.980 ms 10.7 MB
125_accRecNoEta ✋ ✋ 0.977 ms 10.6 MB
126_quotMkType 👍 👍 0.795 ms 10.6 MB
127_quotIndType 👍 👍 0.800 ms 10.4 MB
128_quotLiftType 👍 👍 0.802 ms 10.7 MB
129_quotSoundType 👍 👍 0.806 ms 10.6 MB
130_quotLiftReduction 👍 👍 0.820 ms 10.8 MB
131_quotIndReduction 👍 👍 0.815 ms 10.6 MB
132_dup_defs ✋ ✋ 0.679 ms 10.4 MB
133_dup_ind_def ✋ ✋ 0.700 ms 10.4 MB
134_dup_ctor_def ✋ ✋ 0.701 ms 10.5 MB
135_dup_rec_def ✋ ✋ 0.700 ms 10.5 MB
136_misnamed_rec_user ✋ ✋ 0.713 ms 10.5 MB
137_dup_rec_def2 ✋ ✋ 0.700 ms 10.5 MB
138_dup_ctor_rec ✋ ✋ 0.705 ms 10.5 MB
139_DupConCon ✋ ✋ 0.704 ms 10.4 MB
140_falseFromUnsafe ✋ ✋ 0.702 ms 10.4 MB
141_falseFromPartial ✋ ✋ 0.702 ms 10.5 MB