Lean Kernel Arena / tenet-jvm

Checker "tenet-jvm"

Version: 0.1.2 · 📄 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)

72 ✅ 0 ❌ 0 🚫

Completeness (rightfully accepted tests)

134 ✅ 1 ❌ 0 🚫

Corner cases (no outcome prescribed)

24 ✅ 2 🚫

Test Expected Result ⏱️ 🧠
cedar 👍 👍 1.3 m (-45%) 4.9 GB (×3.6)
con-leche 👍 👍 1.0 m (-46%) 4.7 GB (×5.6)
cslib 👍 👍 4.9 m (-44%) 7.4 GB (×2.2)
init 👍 👍 37.1 s (-44%) 4.3 GB (×7.9)
init-prelude 👍 👍 1.6 s (×4.4) 174.8 MB (×2.4)
mathlib 👍 👍 23.2 m (-28%) 11.7 GB (+18%)
navier-stokes-euler 👍 ✋ 2.6 m 5.6 GB
std 👍 👍 1.0 m (-45%) 4.8 GB (×5.3)
19 3.3 s 92.5 MB
constlevels ✋ ✋ 126 ms 65.8 MB
ctor-num-fields ✋ ✋ 137 ms 66.3 MB
eta-ctor-alias ✋ ✋ 117 ms 65.5 MB
k-rec-conv ✋ ✋ 121 ms 66.5 MB
large-elim-param ✋ ✋ 110 ms 65.6 MB
large-elim-prop-bool ✋ ✋ 133 ms 66.6 MB
level-imax-leq ✋ ✋ 108 ms 66.4 MB
level-imax-normalization ✋ ✋ 114 ms 65.6 MB
nat-rec-k-lie ✋ ✋ 103 ms 65.3 MB
nat-rec-rules ✋ ✋ 114 ms 65.9 MB
nested-unused-param ✋ ✋ 199 ms 71.2 MB
orphan-rec ✋ ✋ 100 ms 64.7 MB
proj-non-structure ✋ ✋ 103 ms 66.2 MB
proj-of-imax-prop ✋ ✋ 122 ms 65.5 MB
proj-of-stuck-prop ✋ ✋ 365 ms 90.5 MB
proj-of-subst-prop ✋ ✋ 373 ms 92.5 MB
rec-k-lie ✋ ✋ 106 ms 65.8 MB
rec-missing-ih ✋ ✋ 367 ms 89.8 MB
rec-of-subst-prop ✋ ✋ 373 ms 88.6 MB
1 3.2 s 72.9 MB
alg-conv-trans-acc 🤷 ✋ 210 ms 72.5 MB
alg-conv-trans-acc-left 🤷 👍 200 ms 72.1 MB
alg-conv-trans-acc-right 🤷 👍 203 ms 72.9 MB
alg-conv-trans-quot 🤷 ✋ 118 ms 65.7 MB
alg-conv-trans-quot-left 🤷 ✋ 117 ms 66.1 MB
alg-conv-trans-quot-left-def 🤷 👍 105 ms 65.3 MB
alg-conv-trans-quot-right 🤷 👍 110 ms 65.9 MB
eta-ctor 🤷 ✋ 118 ms 65.7 MB
eta-rec-struct 🤷 ✋ 112 ms 66.1 MB
eta-rule-k 🤷 ✋ 115 ms 65.0 MB
eta-struct-major-and 🤷 ✋ 118 ms 66.1 MB
eta-struct-major-and-no-whnf 🤷 ⌛ 0 ms 0 B
eta-struct-major-no-whnf 🤷 ⌛ 0 ms 0 B
eta-unit-like-nested 🤷 ✋ 127 ms 66.2 MB
eta-unit-like-pi 🤷 ✋ 114 ms 65.5 MB
eta-unit-like-proof-field 🤷 ✋ 114 ms 65.7 MB
eta-unit-like-struct 🤷 ✋ 117 ms 65.8 MB
imax-right-successor 🤷 👍 91 ms 64.1 MB
let-value-type-mismatch 🤷 ✋ 99 ms 65.2 MB
nested-nonuniform-param 🤷 👍 110 ms 65.6 MB
positivity-whnf 🤷 ✋ 107 ms 65.4 MB
proj-maybe-prop 🤷 👍 113 ms 65.8 MB
proj-maybe-prop-past 🤷 👍 110 ms 65.5 MB
proof-param-ok 👍 👍 89 ms 64.9 MB
proof-param-swap 🤷 ✋ 102 ms 65.1 MB
subject-reduction-redex 🤷 👍 200 ms 71.6 MB
subject-reduction-reduct 🤷 ✋ 195 ms 71.1 MB
9 1.0 s 67.0 MB
extra-rec ✋ ✋ 100 ms 64.6 MB
level-index-out-of-order 👍 👍 85 ms 64.1 MB
nat-lit-add 👍 👍 135 ms 65.9 MB
nat-lit-add-bad ✋ ✋ 143 ms 66.1 MB
nat-lit-ble 👍 👍 136 ms 66.1 MB
nat-lit-sub 👍 👍 141 ms 67.0 MB
orphan-ctor ✋ ✋ 95 ms 64.5 MB
proj-of-prop ✋ ✋ 106 ms 64.6 MB
sparse-name-index 👍 👍 91 ms 64.1 MB
29 2.2 m (+63%) 7.6 GB
app-lam 👍 👍 11.6 s (×2.4) 2.8 GB (+97%)
args-before-unfold 👍 👍 258 ms (×7.2) 73.8 MB (+11%)
beta-ladder 👍 👍 2.2 s (+35%) 603.8 MB (+21%)
church-numerals 👍 👍 325 ms (×6.9) 101.5 MB (+30%)
discarded-argument 👍 👍 443 ms (×2.7) 102.1 MB (+55%)
discarded-argument-match 👍 👍 740 ms (×5.2) 144.8 MB (×2.1)
folded-constant-first 👍 👍 273 ms (×6.7) 76.5 MB (+10%)
folded-constant-last 👍 👍 273 ms (×6.7) 76.4 MB (+11%)
fueled-chain 👍 👍 721 ms (×5.7) 133.4 MB (+75%)
grind-ring-5 👍 👍 3.9 s (+83%) 503.7 MB (×2.2)
identical-nesting 👍 👍 106 ms (×3.7) 64.9 MB (-1%)
irrelevance-before-evaluation 👍 👍 118 ms (×4.1) 65.7 MB (-1%)
let-fold 👍 👍 2.2 s (×38) 563.8 MB (×8.5)
let-ladder 👍 👍 1.3 s (+33%) 447.1 MB (+40%)
magma-list-deep-n21 👍 👍 4.8 s (+78%) 1.0 GB (+58%)
magma-list-deep-n36 👍 👍 57.8 s (+63%) 7.6 GB (-3%)
magma-list-pair-n21 👍 👍 19.8 s (+7%) 4.8 GB (+20%)
magma-list-pair-n7 👍 👍 2.5 s (+51%) 603.8 MB (+42%)
magma-string-n4 👍 👍 4.9 s (+39%) 735.2 MB (×6.1)
magma-string-pair-n9 👍 👍 15.0 s (+83%) 2.4 GB (×2.4)
proj-cheap-struct 👍 👍 215 ms (×6.2) 72.2 MB (+9%)
proj-lazy-struct 👍 👍 164 ms (×5.3) 68.4 MB (+4%)
proj-stuck-struct 👍 👍 159 ms (×5.0) 68.1 MB (+3%)
refute-cheap-first ✋ ✋ 133 ms (×3.2) 66.2 MB (-4%)
refute-cheap-last ✋ ✋ 626 ms (×3.5) 126.5 MB (+84%)
repeated-subproblem 👍 👍 119 ms (×4.2) 65.5 MB (-1%)
shared-subterm 👍 👍 370 ms (×6.4) 84.7 MB (+16%)
shift-cascade 👍 👍 294 ms (×6.4) 81.7 MB (+20%)
unroll-versus-evaluate 👍 👍 162 ms (×5.2) 68.7 MB (+4%)
141 14.4 s 69.0 MB
001_basicDef 👍 👍 91 ms 64.0 MB
002_badDef ✋ ✋ 99 ms 64.5 MB
003_arrowType 👍 👍 91 ms 63.1 MB
004_dependentType 👍 👍 91 ms 63.6 MB
005_constType 👍 👍 91 ms 63.9 MB
006_betaReduction 👍 👍 95 ms 64.5 MB
007_betaReduction2 👍 👍 95 ms 63.7 MB
008_forallSortWhnf 👍 👍 93 ms 63.8 MB
009_forallSortBad ✋ ✋ 97 ms 64.1 MB
010_nonTypeType ✋ ✋ 97 ms 64.2 MB
011_nonTypeAxiom ✋ ✋ 97 ms 64.3 MB
012_nonPropThm ✋ ✋ 92 ms 63.9 MB
013_thmProof 👍 👍 93 ms 64.0 MB
014_selfProof ✋ ✋ 95 ms 64.3 MB
015_levelComp1 👍 👍 90 ms 63.4 MB
016_levelComp2 👍 👍 89 ms 63.3 MB
017_levelComp3 👍 👍 91 ms 63.5 MB
018_levelParams 👍 👍 88 ms 64.2 MB
019_tut06_bad01 ✋ ✋ 94 ms 63.9 MB
020_levelComp4 👍 👍 91 ms 64.1 MB
021_levelComp5 👍 👍 91 ms 63.8 MB
022_imax1 👍 👍 91 ms 63.5 MB
023_imax2 👍 👍 91 ms 64.2 MB
024_levelMaxComm 👍 👍 91 ms 63.5 MB
025_levelMaxAssoc 👍 👍 91 ms 63.7 MB
026_levelMaxIdem 👍 👍 90 ms 63.6 MB
027_levelMaxAbsorb 👍 👍 90 ms 63.8 MB
028_inferVar 👍 👍 92 ms 63.8 MB
029_defEqLambda 👍 👍 92 ms 63.9 MB
030_peano1 👍 👍 91 ms 63.7 MB
031_peano2 👍 👍 99 ms 63.9 MB
032_peano3 👍 👍 93 ms 64.4 MB
033_letType 👍 👍 90 ms 64.0 MB
034_letTypeDep 👍 👍 94 ms 64.2 MB
035_letRed 👍 👍 94 ms 63.9 MB
036_empty 👍 👍 97 ms 64.8 MB
037_boolType 👍 👍 96 ms 65.0 MB
038_twoBool 👍 👍 100 ms 63.9 MB
039_andType 👍 👍 100 ms 64.0 MB
040_prodType 👍 👍 100 ms 64.3 MB
041_pprodType 👍 👍 103 ms 64.9 MB
042_pUnitType 👍 👍 101 ms 64.1 MB
043_eqType 👍 👍 96 ms 63.6 MB
044_natDef 👍 👍 99 ms 64.4 MB
045_rbTreeDef 👍 👍 126 ms 64.9 MB
046_inductBadNonSort ✋ ✋ 98 ms 64.4 MB
047_inductBadNonSort2 ✋ ✋ 90 ms 64.4 MB
048_inductLevelParam ✋ ✋ 93 ms 64.1 MB
049_inductTooFewParams ✋ ✋ 95 ms 64.2 MB
050_inductWrongCtorParams ✋ ✋ 96 ms 64.4 MB
051_inductWrongCtorResParams ✋ ✋ 100 ms 65.0 MB
052_inductWrongCtorResLevel ✋ ✋ 101 ms 64.3 MB
053_inductInIndex ✋ ✋ 102 ms 64.8 MB
054_indNeg ✋ ✋ 101 ms 65.0 MB
055_reduceCtorParam.mk 👍 👍 94 ms 64.1 MB
056_reduceCtorType.mk ✋ ✋ 93 ms 64.1 MB
057_indNegReducible ✋ ✋ 101 ms 64.3 MB
058_predWithTypeField 👍 👍 96 ms 64.3 MB
059_typeWithTypeField 👍 👍 96 ms 64.1 MB
060_typeWithTypeFieldPoly 👍 👍 99 ms 64.4 MB
061_typeWithTooHighTypeField.mk ✋ ✋ 101 ms 64.6 MB
062_emptyRec 👍 👍 99 ms 64.4 MB
063_boolRec 👍 👍 100 ms 64.2 MB
064_twoBoolRec 👍 👍 102 ms 64.1 MB
065_andRec 👍 👍 101 ms 63.9 MB
066_prodRec 👍 👍 102 ms 64.6 MB
067_pprodRec 👍 👍 104 ms 64.5 MB
068_punitRec 👍 👍 101 ms 64.8 MB
069_eqRec 👍 👍 101 ms 64.6 MB
070_nRec 👍 👍 102 ms 64.4 MB
071_rbTreeRef 👍 👍 124 ms 64.9 MB
072_boolPropRec 👍 👍 97 ms 63.7 MB
073_BogusRecursor ✋ ✋ 103 ms 64.3 MB
074_existsRec 👍 👍 98 ms 64.7 MB
075_typeSingletonRecReduction 👍 👍 110 ms 64.4 MB
076_sortElimPropRec 👍 👍 104 ms 64.5 MB
077_sortElimProp2Rec 👍 👍 104 ms 64.8 MB
078_boolRecEqns 👍 👍 110 ms 64.5 MB
079_prodRecEqns 👍 👍 117 ms 64.6 MB
080_nRecReduction 👍 👍 117 ms 65.0 MB
081_listRecReduction 👍 👍 126 ms 65.3 MB
082_RBTree.id_spec 👍 👍 174 ms 69.0 MB
083_And.right 👍 👍 101 ms 63.9 MB
084_Prod.snd 👍 👍 104 ms 65.1 MB
085_PProd.snd 👍 👍 105 ms 64.6 MB
086_PSigma.snd 👍 👍 105 ms 64.7 MB
087_projOutOfRange ✋ ✋ 106 ms 64.4 MB
088_projNotStruct ✋ ✋ 104 ms 64.6 MB
089_projProp1 👍 👍 109 ms 64.7 MB
090_projProp2 ✋ ✋ 111 ms 64.4 MB
091_projProp3 👍 👍 112 ms 65.1 MB
092_projProp4 ✋ ✋ 110 ms 65.1 MB
093_projProp5 ✋ ✋ 113 ms 64.3 MB
094_projProp6 ✋ ✋ 111 ms 64.9 MB
095_projDataIndexRec 👍 👍 105 ms 64.6 MB
096_projIndexData ✋ ✋ 114 ms 64.9 MB
097_projIndexData2 ✋ ✋ 123 ms 64.7 MB
098_projRed 👍 👍 113 ms 64.8 MB
099_ruleK 👍 👍 103 ms 64.5 MB
100_ruleKbad ✋ ✋ 114 ms 65.2 MB
101_ruleKAcc ✋ ✋ 121 ms 65.0 MB
102_aNatLit 👍 👍 100 ms 63.9 MB
103_natLitEq 👍 👍 97 ms 63.7 MB
104_proofIrrelevance 👍 👍 103 ms 64.0 MB
105_proofIrrelevanceBad ✋ ✋ 108 ms 64.4 MB
106_proofIrrelevanceWhnf 👍 👍 102 ms 64.5 MB
107_proofIrrelevanceUnderBinder 👍 👍 94 ms 64.4 MB
108_unitEta1 👍 👍 106 ms 64.5 MB
109_unitEta2 👍 👍 107 ms 64.5 MB
110_unitEta3 👍 👍 101 ms 64.3 MB
111_indexedUnitEta ✋ ✋ 114 ms 65.1 MB
112_structEta 👍 👍 121 ms 65.0 MB
113_indexedStructEta ✋ ✋ 117 ms 65.1 MB
114_funEta 👍 👍 102 ms 63.8 MB
115_funEtaDep 👍 👍 101 ms 64.4 MB
116_funEtaBad ✋ ✋ 108 ms 64.9 MB
117_reflOccLeft ✋ ✋ 106 ms 65.1 MB
118_reflOccInIndex ✋ ✋ 105 ms 64.9 MB
119_reduceCtorParamRefl.mk 👍 👍 99 ms 64.4 MB
120_reduceCtorParamRefl2.mk 👍 👍 100 ms 64.4 MB
121_rTreeRec 👍 👍 104 ms 64.8 MB
122_rtreeRecReduction 👍 👍 112 ms 64.8 MB
123_accRecType 👍 👍 111 ms 64.9 MB
124_accRecReduction 👍 👍 124 ms 65.0 MB
125_accRecNoEta ✋ ✋ 129 ms 65.5 MB
126_quotMkType 👍 👍 104 ms 64.3 MB
127_quotIndType 👍 👍 104 ms 64.5 MB
128_quotLiftType 👍 👍 104 ms 64.3 MB
129_quotSoundType 👍 👍 107 ms 64.4 MB
130_quotLiftReduction 👍 👍 110 ms 64.6 MB
131_quotIndReduction 👍 👍 108 ms 64.4 MB
132_dup_defs ✋ ✋ 93 ms 63.5 MB
133_dup_ind_def ✋ ✋ 99 ms 64.3 MB
134_dup_ctor_def ✋ ✋ 92 ms 63.9 MB
135_dup_rec_def ✋ ✋ 101 ms 64.2 MB
136_misnamed_rec_user ✋ ✋ 99 ms 64.2 MB
137_dup_rec_def2 ✋ ✋ 101 ms 65.1 MB
138_dup_ctor_rec ✋ ✋ 98 ms 64.5 MB
139_DupConCon ✋ ✋ 97 ms 64.1 MB
140_falseFromUnsafe ✋ ✋ 101 ms 64.2 MB
141_falseFromPartial ✋ ✋ 100 ms 64.4 MB

Detailed results

Test "bugs/constlevels"

Expected: ✋ reject · Size: 15.3 KB · Lines: 283 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Regression test for undefined behavior in lazy_delta_reduction_step in the official kernel

In the function lazy_delta_reduction_step, the official kernel expects unfold_definition to always succeed. However, if the constant has an incorrect number of level parameters, it actually fails, which leads to memory corruption in lazy_delta_reduction_step.

This test is to check that the official kernel and also other kernels that closely follow the logic of the official kernel correctly handle this unfolding failure.

The issue in the official kernel was originally reported as https://github.com/leanprover/lean4/issues/10577.

Test result: ✋ rejected · exit code 1 · wall time: 199 ms · instructions: 754.1 M · max rss memory: 65.8 MB

stdout:
REJECTED THM _test: let-value type mismatch for x
  value has type: Sort(1)
  expected: Nat
lean 4.29.1, export format 3.1.0, 283 lines
checked 19 constants ({DEF=4, THM=3}) and 4 inductive blocks in 0.06s
axioms declared: none
1 declaration(s) rejected

Test "bugs/ctor-num-fields"

Expected: ✋ reject · Size: 34.1 KB · Lines: 622 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof of False via trusted numFields on a constructor.

Define a wrapper structure S with one field, and lie by saying it has 0 fields, making it look unit-like. Then definitional eta means all inhabitants are equal.

Derive a contradiction from S.mk false = S.mk true.

Nanoda and its descendants accepted this until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 118 ms · instructions: 821.5 M · max rss memory: 66.3 MB

stdout:
REJECTED inductive _private.Test.0.S: constructor _private.Test.0.S.mk has wrong bookkeeping
lean 4.34.1, export format 3.1.0, 622 lines
checked 16 constants ({DEF=3}) and 4 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "bugs/eta-ctor-alias"

Expected: ✋ reject · Size: 7.2 KB · Lines: 122 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Bogus proof that f = Box.mk for every f : BoxFn, where BoxFn is a reducible alias for Bool → Box.

A checker that eta-expands a partially applied constructor (see corner-cases/eta-ctor) has to take the missing arguments from the type of the constructor application. Taking them from the type of the other side without unfolding it, here BoxFn, finds no arguments to add, then compares the (zero) given fields only, and accepts.

This bug was found by phiferd in a draft of https://github.com/leanprover/lean4/pull/15373 to the official kernel, and fixed before it was merged.

Test result: ✋ rejected · exit code 1 · wall time: 107 ms · instructions: 702.9 M · max rss memory: 65.5 MB

stdout:
REJECTED THM etaCtorAlias: declaration type mismatch, etaCtorAlias
  value has type: (? a : BoxFn, (Eq.{[1]} BoxFn #0 #0))
  but is expected to have type: (? f : BoxFn, (Eq.{[1]} BoxFn #0 Box.mk))
lean 4.34.1, export format 3.1.0, 122 lines
checked 11 constants ({DEF=1}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/k-rec-conv"

Expected: ✋ reject · Size: 12.6 KB · Lines: 232 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Bogus proof that tests for incorrectly implemented K-like reduction.

fun x => x and fun _ => y are not convertible, but a checker that does treat them as convertible would accept the resulting theorem bad, which is true propositionally, but not definitionally.

Regression test for sokonanoda.

Test result: ✋ rejected · exit code 1 · wall time: 107 ms · instructions: 727.9 M · max rss memory: 66.5 MB

stdout:
REJECTED THM bad: declaration type mismatch, bad
  value has type: (Eq.{[1]} T t1 t1)
  but is expected to have type: (Eq.{[1]} T t1 t2)
lean 4.34.1, export format 3.1.0, 232 lines
checked 15 constants ({DEF=5}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/large-elim-param"

Expected: ✋ reject · Size: 6.2 KB · Lines: 88 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False via incorrect large elimination restriction.

If the check for whether a level is surely not zero is implemented wrong, in particular if it incorrectly returns true for params, we can create a universe-polymorphic

inductive MyBool.{u} : Sort u | tt | ff

where the recursor MyBool.rec.{1,0} can do large elimination of a Prop. Because of proof irrelevance we have tt = ff, so we can derive a contradiction.

Found by Anthony Wang using Aristotle, breaking the mini checker for the T-shirt bounty; it was fixed the same day.

Test result: ✋ rejected · exit code 1 · wall time: 109 ms · instructions: 662.6 M · max rss memory: 65.6 MB

stdout:
REJECTED inductive MyBool: recursor MyBool.rec has the wrong type
  expected: (? motive : (? t : MyBool.{[u]}, Sort(0)), (? mtt : (#0 MyBool.tt.{[u]}), (? mff : (#1 MyBool.ff.{[u]}), (? t : MyBool.{[u]}, (#3 #0)))))
  exported: (? motive : (? a : MyBool.{[u]}, Sort(v)), (? mtt : (#0 MyBool.tt.{[u]}), (? mff : (#1 MyBool.ff.{[u]}), (? t : MyBool.{[u]}, (#3 #0)))))
lean 4.29.1, export format 3.1.0, 88 lines
checked 5 constants ({}) and 2 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "bugs/large-elim-prop-bool"

Expected: ✋ reject · Size: 22.6 KB · Lines: 438 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof of False by allowing a Prop inductive to have the same recursor that the corresponding Type inductive would have.

Proof irrelevance makes .tt = .ff, but pick distinguishes between them.

Kiota accepted this until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 117 ms · instructions: 800.6 M · max rss memory: 66.6 MB

stdout:
REJECTED inductive NewBool: recursor NewBool.rec has the wrong type
  expected: (? motive : (? t : NewBool, Sort(0)), (? tt : (#0 NewBool.tt), (? ff : (#1 NewBool.ff), (? t : NewBool, (#3 #0)))))
  exported: (? motive : (? t : NewBool, Sort(u)), (? tt : (#0 NewBool.tt), (? ff : (#1 NewBool.ff), (? t : NewBool, (#3 #0)))))
lean 4.34.1, export format 3.1.0, 438 lines
checked 14 constants ({DEF=4, THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/level-imax-leq"

Expected: ✋ reject · Size: 5.6 KB · Lines: 93 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False via incorrect universe level comparison for imax.

A correct kernel must reject leq(imax(u,v)+1, imax(u,v)), since at u=0, v=0 this becomes leq(1, 0) which is false. However, a checker that only compares the imax arguments structurally (without accounting for an accumulated successor offset) will incorrectly accept it.

This allows defining a universe-collapsing identity function down.{u,v} : Sort (succ (imax u v)) → Sort (imax u v), which is used to cast between True and False via Bool.rec at Sort (imax 0 0) = Prop.

Nanoda incorrectly accepted this proof until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 111 ms · instructions: 648.4 M · max rss memory: 66.4 MB

stdout:
REJECTED inductive False: recursor False.rec has the wrong type
  expected: (? motive : (? t : False, Sort(u)), (? t : False, (#1 #0)))
  exported: (? motive : (? t : False, Sort(u_1)), (? t : False, (#1 #0)))
lean 4.29.1, export format 3.1.0, 93 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/level-imax-normalization"

Expected: ✋ reject · Size: 5.8 KB · Lines: 96 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False via incorrect universe level normalization for imax.

A correct kernel must distinguish imax 0 v from succ(imax 0 v), since at v=0 these evaluate to 0 and 1 respectively. However, a level normalization algorithm that drops an accumulated successor offset when decomposing imax u (param v) will produce identical normal forms for both, causing the equivalence check to incorrectly return true.

This allows defining a universe-collapsing identity function down.{v} : Sort (succ (imax 0 v)) → Sort (imax 0 v), and then myProp : Prop := down.{0} Bool (a Prop that is computationally Bool). Proof irrelevance on myProp equates Bool.true and Bool.false, and Bool.rec maps this into False.

Test result: ✋ rejected · exit code 1 · wall time: 115 ms · instructions: 685.6 M · max rss memory: 65.6 MB

stdout:
REJECTED DEF down: declaration type mismatch, down
  value has type: (? x : Sort(imax(0,v)+1), Sort(imax(0,v)+1))
  but is expected to have type: (? x : Sort(imax(0,v)+1), Sort(imax(0,v)))
lean 4.29.1, export format 3.1.0, 96 lines
checked 9 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/nat-rec-k-lie"

Expected: ✋ reject · Size: 6.3 KB · Lines: 106 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False via trusted k on Nat.rec.

Lie by claiming Nat.rec is K-like. Then replace the major premise by Nat.zero, but nat literals bypasses K-like reduction, so two reduction rules disagree.

∀ n, g n holds by the first, and g 1 is False by the second.

A variant of bugs/rec-k-lie, which nanoda and its descendants accepted until it was fixed; at that time, nanoda itself rejected this variant, as it had no literal path for Nat.rec.

Test result: ✋ rejected · exit code 1 · wall time: 103 ms · instructions: 620.2 M · max rss memory: 65.3 MB

stdout:
REJECTED inductive Nat: recursor Nat.rec has wrong bookkeeping
lean 4.29.1, export format 3.1.0, 106 lines
checked 2 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "bugs/nat-rec-rules"

Expected: ✋ reject · Size: 8.1 KB · Lines: 128 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False via incorrect recursor rule validation.

When processing an inductive type declaration, a correct kernel must verify that the generated recursor rules match the ones provided in the export data. A checker that accidentally compares the imported rules against themselves (instead of against independently constructed rules) will accept arbitrary recursor reduction behavior.

This test defines Nat with a wrong Nat.rec succ rule that always returns hzero (ignoring the induction hypothesis). Combined with a nat literal extension that hardcodes correct arithmetic for concrete nat literals but falls back to the wrong Nat.rec rules for symbolic arguments, this creates an inconsistency that yields a proof of False.

Nanoda incorrectly accepted this proof until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 110 ms · instructions: 681.9 M · max rss memory: 65.9 MB

stdout:
REJECTED inductive False: recursor False.rec has the wrong type
  expected: (? motive : (? t : False, Sort(u)), (? t : False, (#1 #0)))
  exported: (? motive : (? t : False, Sort(u_1)), (? t : False, (#1 #0)))
lean 4.29.1, export format 3.1.0, 128 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/nested-unused-param"

Expected: ✋ reject · Size: 61.1 KB · Lines: 1.1 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Checks that the parameters of a nested inductive application are type-checked even when they do not appear in the auxiliary type generated during nested-inductive compilation.

When an inductive E has a constructor whose type contains a nested application L (E w) b, the elaboration of nested inductives replaces that occurrence with an auxiliary type. The argument b does not occur in the auxiliary declaration, so a checker that only checks the auxiliary type never sees b. A correct checker must still ensure b is well-typed; this test rejects if it is not.

Here b is a malformed projection C.0 (C.0 w) (applying a C projection to a value of the unrelated structure W), disguised by a hash collision. If the parameter is not checked, the bogus projection slips through and the resulting E can be used to build an axiom-free proof of False (boom). The projection is merely the payload; the property under test is that the nested-inductive parameter is checked.

Origin: reported as leanprover/lean4#14576 by @kiranandcode, with the original source recorded by @xrchz (https://github.com/xrchz/collatzlean); fixed in leanprover/lean4#14577.

Test result: ✋ rejected · exit code 1 · wall time: 132 ms · instructions: 1.2 G · max rss memory: 71.2 MB

stdout:
REJECTED THM bad: application type mismatch
  function head: E.mk
  argument: e.1
  has type: (L (E (W.mk (P.mk ((fun x : Nat => Bool.true) 24083)))) (W.mk (P.mk ((fun x : Nat => Bool.true) 24083))).1.1)
  but is expected to have type: (L (E (W.mk (P.mk ((fun x : Nat => Bool.false) 78670)))) (W.mk (P.mk ((fun x : Nat => Bool.false) 78670))).1.1)
lean 4.34.1, export format 3.1.0, 1080 lines
checked 66 constants ({DEF=19, THM=3}) and 14 inductive blocks in 0.07s
axioms declared: none
1 declaration(s) rejected

Test "bugs/orphan-rec"

Expected: ✋ reject · Size: 1.4 KB · Lines: 21 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False from a recursor that claims not to belong to any inductive type.

The export contains False exactly as the prelude has it — an empty Prop-valued inductive with no constructors — together with its ordinary False.rec. Smuggled into the same inductive block is a second recursor, named rogue, whose type is False itself, which has no motives, no minor premises and no rules, and whose all field is the empty list. The theorem inconsistent : False is then simply rogue.

This is the sibling of other/extra-rec, and it defeats the obvious fix for it. A checker that associates each exported recursor with the inductive type named in its all field, and then requires the recursors so associated with an inductive type to be exactly the ones it derives from that declaration, still accepts rogue: False is associated with False.rec and nothing else, and rogue is associated with nothing at all, so no comparison ever looks at it — yet it is added to the environment and inhabits the genuine empty type.

A checker must therefore reject any recursor it did not itself derive from an inductive declaration, rather than only checking the recursors that point at one. The same hole is reachable by pointing all at a name that has no declaration in the export (that variant is what other/orphan-ctor does on the constructor side).

Nanoda accepted this export until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 102 ms · instructions: 601.5 M · max rss memory: 64.7 MB

stdout:
REJECTED inductive False: export has 2 recursors but 1 are expected
lean 4.29.1, export format 3.1.0, 21 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "bugs/proj-non-structure"

Expected: ✋ reject · Size: 5.0 KB · Lines: 75 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Bad has two constructors, so projections should not be allowed. Prove false by using the second constructor, then projecting, hoping that the first constructor is used when inferring the type of the projection.

Nanoda and its descendants accepted this until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 96 ms · instructions: 616.1 M · max rss memory: 66.2 MB

stdout:
REJECTED THM bad: invalid projection, not a structure: Bad
lean 4.34.1, export format 3.1.0, 75 lines
checked 9 constants ({}) and 3 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "bugs/proj-of-imax-prop"

Expected: ✋ reject · Size: 19.3 KB · Lines: 321 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A closed proof of False, with no axioms, via a data projection out of a proposition whose sort is Prop only up to universe level normalization.

ImaxProp : Sort (imax 1 0) is a proposition, since imax 1 0 normalizes to 0. The exploit uses two definitionally equal spellings of that type. Proof irrelevance is stated through ImaxAsProp : Prop := ImaxProp, whose type is the literal Sort 0, so it is accepted; the data projection imaxProjBool is stated on ImaxProp, whose type is the literal Sort (imax 1 0). A kernel that tests sorts for Prop syntactically does not recognize the latter as a proposition and wrongly allows projecting its Bool field out of a proof. Congruence on the proof-irrelevance equation then equates false and true, giving False.

This is https://github.com/leanprover/lean4/pull/14613, a bug in the official kernel.

Test result: ✋ rejected · exit code 1 · wall time: 126 ms · instructions: 732.4 M · max rss memory: 65.5 MB

stdout:
REJECTED DEF imaxProjBool: invalid projection, structure is a proposition but field is not: _f83.1
lean 4.34.1, export format 3.1.0, 321 lines
checked 25 constants ({DEF=7}) and 5 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "bugs/proj-of-stuck-prop"

Expected: ✋ reject · Size: 275.7 KB · Lines: 5.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof of False by projecting the Bool field out of a proposition, exploiting that a kernel can disagree with itself about whether the structure lives in Prop.

Same underlying defect as bugs/rec-missing-ih, but with a different consequence.

Mechanism

  1. Definitional equality is not transitive here. Three functions Bool → Bool are built from Acc.rec such that a kernel reports rcA ≡ rcB and rcB ≡ rcC — both by proof irrelevance on the Acc argument — while rcA ≢ rcC, because there the two Acc proofs have different types.

  2. In the affected kernels, the defeq cache closes that relation transitively, but only for hash-equal terms. Established equalities are kept in a union-find structure, and the comparison returns early, without consulting it, when the hashes differ:

    ~~~cpp if (is_eqp(a, b)) return true; if (m_use_hash && hash(a) != hash(b)) return false; // skips the union-find ... node_ref r1 = find(to_node(a)); node_ref r2 = find(to_node(b)); if (r1 == r2) return true; ~~~

    So whether rcA ≡ rcC holds depends on the hash of the surrounding term. The constants and paddings are chosen so that the hashes collide exactly when the argument is the free variable _kernel_fresh.0, and not for the closed instantiation used later.

  3. That comparison decides a result sort. Native64ResultSortGate is a K-like inductive predicate, and its recursor is used as the result sort of the inductive family Native64ResultSortOwner: the sort Gate.rec x … Prop requested h reduces to Prop only if the requested indices are definitionally equal to the ones of Gate.intro. Hence Owner x h is a proposition in one context and a stuck sort in another:

    • Native64ResultSort.asProp is checked against a constant standing for ∀ x h, Prop, so the kernel introduces _kernel_fresh.0 for x, the hashes collide, Owner x h : Prop is accepted, and Native64ResultSortLeak.proposition is a Prop for every later declaration — including for proof irrelevance.
    • Native64ResultSortLeak.observe projects field 0 out of that proposition. There the sort of the closed term Owner false closedGate is needed, and that one is stuck — the affected kernels answer false when asked whether it is definitionally equal to Prop — so they do not see a proposition and permit projecting out the Bool field.

Proof irrelevance then identifies two Owner.mk applications carrying different Bool fields, and observing them yields False. The affected kernels rejected Native64ResultSortOwner with type expected as soon as the hashes no longer collided.

This was accepted by the official kernel at v4.28.0, v4.29.1, v4.33.0 and nightly-2026-08-01. Other kernels reject the export in one of two places: either they refuse Native64ResultSortOwner because its result type does not reduce to a sort, or they accept the type but refuse the projection of a data field out of a proposition.

Both steps are ruled out now: the projection by leanprover/lean4#14807, which makes the kernel's is_prop check require the inferred type to reduce to a sort, and the hash-gated transitivity of step 2 by leanprover/lean4#14806, which replaces the union-find defeq cache with an order-independent one. The same projection, reached without any help from that cache, is bugs/proj-of-subst-prop.

Test result: ✋ rejected · exit code 1 · wall time: 172 ms · instructions: 2.2 G · max rss memory: 90.5 MB

stdout:
REJECTED inductive Native64ResultSortOwner: type expected
  term: (Native64ResultSortGate.rec.{[2]} _f1888 (fun index : Bool => (fun index : Bool => (fun index : Bool => (fun index : Bool => (fun proof : (Native64ResultSortGate _f1888 #3 #2 #1 #0) => Sort(1)))))) Sort(0) (Native64SortGateB.0.3766726852 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) (Native64SortGateA.1.2023879994 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) (Native64SortGateA.1.2023879994 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) (Native64SortGateA.1.2023879994 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) _f1889)
  has type: (Native64ResultSortGate.rec.{[2]} _f1888 (fun index : Bool => (fun index : Bool => (fun index : Bool => (fun index : Bool => (fun proof : (Native64ResultSortGate _f1888 #3 #2 #1 #0) => Sort(1)))))) Sort(0) (Native64SortGateB.0.3766726852 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) (Native64SortGateA.1.2023879994 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) (Native64SortGateA.1.2023879994 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) (Native64SortGateA.1.2023879994 ((fun salt : Nat => _f1888) (OfNat.ofNat.{[0]} Nat 125330 (instOfNatNat 125330)))) _f1889)
lean 4.34.1, export format 3.1.0, 5261 lines
checked 147 constants ({DEF=60, THM=25, OPAQUE=1}) and 19 inductive blocks in 0.09s
axioms declared: none
1 declaration(s) rejected

Test "bugs/proj-of-subst-prop"

Expected: ✋ reject · Size: 254.9 KB · Lines: 4.8 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof of False by projecting the Bool field out of a proposition, reached by substituting a proof of one proposition for a proof of a definitionally equal one.

Mechanism

  1. Definitional equality is not transitive here. a, b and c are three Bools built from Acc.rec such that a kernel reports a ≡ b and b ≡ c — both by proof irrelevance on the Acc argument, the latter after some iota steps — while a ≢ c, because there the two Acc proofs have different types (Acc (· < ·) 1 vs. Acc (· < ·) 0).

  2. So P := a = b and Q := a = c are definitionally equal types whose proofs behave differently. gate h := Eq.rec (motive := fun _ _ => Type) Prop h K-reduces to Prop for h : P, because that reduction only needs the type of h to be definitionally equal to the type a = a of Eq.refl a, i.e. b ≡ a. For the closed witness : Q it stays stuck, since that would need c ≡ a.

  3. An inductive family is declared over the reducing side and used on the stuck one. Owner : ∀ (h : P), gate h is accepted as a family of propositions — its recursor only eliminates into Prop. Owner witness is well-typed, since Q ≡ P, but its sort does not reduce to Prop, so the projection observe is permitted to extract the Bool field from an inhabitant.

Proof irrelevance then identifies two Owner.mk applications carrying different Bool fields, and observing them yields False, with no axioms involved.

Unlike bugs/rec-missing-ih and bugs/proj-of-stuck-prop, this needs no interference from the definitional-equality cache: every comparison above comes out the same way in a fresh type-checker session, so it is independent of whether, and how, such a cache is keyed. What it does need is that the sort of an inductive family is re-examined after a substitution that definitional equality permits.

The projection in the last step is ruled out by leanprover/lean4#14807, which makes the kernel's is_prop check require the inferred type to reduce to a sort: a stuck sort then raises (kernel) type expected instead of answering that the type is not a proposition.

Test result: ✋ rejected · exit code 1 · wall time: 194 ms · instructions: 2.2 G · max rss memory: 92.5 MB

stdout:
REJECTED DEF PR14806Subst.observe: type expected: (PR14806Subst.Owner PR14806Subst.witness) has type (Eq.rec.{[2, 1]} Bool PR14806Subst.a (fun x._@.Test.1276904436._hygCtx._hyg.7 : Bool => (fun x._@.Test.1276904436._hygCtx._hyg.9 : (Eq.{[1]} Bool PR14806Subst.a #0) => Sort(1))) Sort(0) PR14806Subst.b PR14806Subst.witness)
lean 4.34.1, export format 3.1.0, 4848 lines
checked 151 constants ({DEF=62, THM=26, OPAQUE=2}) and 19 inductive blocks in 0.10s
axioms declared: none
1 declaration(s) rejected

Test "bugs/rec-k-lie"

Expected: ✋ reject · Size: 5.3 KB · Lines: 87 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

False theorem via trusted k on a recursor.

Define MyBool with two constructors, and lie by claiming its recursor is K-like, so the major premise is replaced by the first constructor without being examined.

disc MyBool.true is then True rather than False.

MyBool rather than Bool because a module that overwrites an imported constant cannot be re-imported by the exporter.

Nanoda and its descendants accepted this until it was fixed.

Test result: ✋ rejected · exit code 1 · wall time: 108 ms · instructions: 634.9 M · max rss memory: 65.8 MB

stdout:
REJECTED inductive MyBool: recursor MyBool.rec has wrong bookkeeping
lean 4.34.1, export format 3.1.0, 87 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "bugs/rec-missing-ih"

Expected: ✋ reject · Size: 289.6 KB · Lines: 5.5 k · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False from a generated recursor whose reduction rule drops the induction hypothesis.

Mechanism

  1. Definitional equality is not transitive here. The test builds three functions Bool → Bool from Acc.rec for which a kernel reports rcA ≡ rcB and rcB ≡ rcC — both by proof irrelevance on the Acc argument, the latter after some iota steps — but rcA ≢ rcC, because there the two Acc proofs have different types (Acc (· < ·) 1 vs. Acc (· < ·) 0).

  2. In the affected kernels, the defeq cache closes that relation transitively, but only for hash-equal terms. Established equalities are kept in a union-find structure, and the comparison returns early, without consulting it, when the hashes differ:

    ~~~cpp if (is_eqp(a, b)) return true; if (m_use_hash && hash(a) != hash(b)) return false; // skips the union-find ... node_ref r1 = find(to_node(a)); node_ref r2 = find(to_node(b)); if (r1 == r2) return true; ~~~

    So whether rcA ≡ rcC holds depends on the hash of the surrounding term. The three constants and the two paddings are picked so that the hashes collide for the free variables that the affected implementations create while building the minor premises of the recursor (_ind_fresh.3, _ind_fresh.9), but not for the pass that builds the recursor rules (_ind_fresh.14).

  3. A K-like reduction is made to depend on that comparison. Native64TwoHashGate is a K-like inductive predicate (one parameter, four Bool indices, one field-less constructor pinning the indices), so reducing Gate.rec … h requires the indices of h's type to be definitionally equal to the ones of Gate.intro's result type. Native64TwoHashOwner.step has a recursive argument whose type is such a Gate.rec application, which therefore reduces to Owner in one pass but not in the other.

The resulting Native64TwoHashOwner.rec has a step minor premise expecting four arguments (including the induction hypothesis) but a rule that applies it to only three, so the ih binder swallows the next argument. That makes the Prop-valued badProp reduce to Bool, and a Prop with two distinguishable inhabitants gives False.

Affected kernels not only accept these declarations, they also re-derive the same broken recursor when replaying the export data. This was the case for the official kernel at v4.28.0, v4.29.1, v4.33.0 and nightly-2026-08-01. Kernels that construct the recursor independently reject the export, mostly with an error about Native64TwoHashOwner.step having an invalid occurrence of the datatype being declared — which is also what the affected kernels reported as soon as one of the hashes no longer collided.

Fixed by leanprover/lean4#14806, which replaces the union-find defeq cache with an order-independent one, so that a hash collision can no longer make a comparison succeed that fails on its own.

Test result: ✋ rejected · exit code 1 · wall time: 176 ms · instructions: 2.2 G · max rss memory: 89.8 MB

stdout:
REJECTED inductive Native64TwoHashOwner: arg #3 of 'Native64TwoHashOwner.step' has a non valid occurrence of the datatypes being declared
lean 4.29.1, export format 3.1.0, 5526 lines
checked 148 constants ({DEF=56, THM=27, OPAQUE=1}) and 20 inductive blocks in 0.09s
axioms declared: none
1 declaration(s) rejected

Test "bugs/rec-of-subst-prop"

Expected: ✋ reject · Size: 269.2 KB · Lines: 5.1 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof of False from a Prop that carries a Type field, recovered through the recursor instead of a projection.

A second variant of bugs/proj-of-subst-prop, sharing its first two steps:

  1. Definitional equality is not transitive on three Bools built from Acc.rec — gateA ≡ gateB and gateB ≡ gateC by proof irrelevance on the Acc argument, but gateA ≢ gateC — so GateP := gateA = gateB and GateQ := gateA = gateC are definitionally equal types whose proofs behave differently under Eq.rec. resultSort h K-reduces to Prop for a variable h : GateP and stays stuck for the closed gateWitness : GateQ.

  2. Issue.Owner : ∀ (h : GateP), resultSort h is therefore accepted as a family of propositions whose constructor carries a field A : Type, while Owner gateWitness — well-typed, since GateQ ≡ GateP — has a sort that does not reduce to Prop.

Where bugs/proj-of-subst-prop then projects the field out, this variant eliminates Owner with its own Prop-only recursor into Fiber X := Acc emptyTypeRel X, which is a proposition, and recovers the data from there: Acc.rec eliminates Acc into Type, and propext transports an Acc proof between two Fiber types. Proof irrelevance identifies Owner.mk gateWitness Empty with Owner.mk gateWitness Unit, so the identity function of one type is applied to a value of the other, and Empty becomes inhabited. The proof of False uses propext and no other axiom.

Because no projection is involved, the guard that stops bugs/proj-of-subst-prop — refusing to project a data field out of a proposition — never fires here. A checker has to refuse the substitution, or the stuck result sort of Issue.Owner, instead.

Both variants are ruled out by leanprover/lean4#14807, which makes the kernel's is_prop check require the inferred type to reduce to a sort: Issue.Owner is then rejected with (kernel) type expected.

The exploit is by Daniel Selsam (OpenAI), generated with OpenAI's internal models, and is the regression test added in leanprover/lean4#14847.

Test result: ✋ rejected · exit code 1 · wall time: 174 ms · instructions: 2.2 G · max rss memory: 88.6 MB

stdout:
REJECTED THM Issue.forallFalse: application type mismatch
  function head: Issue.identityValue
  argument: (Issue.identityValue Unit (Issue.Owner.rec Issue.gateWitness (fun major : Issue.proposition => (Issue.Fiber Unit)) (Issue.transport Unit) (Issue.delayedOwner _f2047 (Issue.Owner.mk Issue.gateWitness Unit))) Unit.unit)
  has type: (Issue.preserveType Unit)
  but is expected to have type: (Issue.preserveType Empty)
lean 4.34.1, export format 3.1.0, 5094 lines
checked 175 constants ({AXIOM=1, DEF=78, THM=24, OPAQUE=3}) and 22 inductive blocks in 0.09s
axioms declared: propext
1 declaration(s) rejected

Test "cedar"

Expected: 👍 accept · Size: 832.0 MB · Lines: 15.3 M · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Lean formalization of, and proofs about, Cedar.

Auto-generated documentation is available at https://cedar-policy.github.io/cedar-spec/docs/.

This test case exports the whole Cedar module and as such contains even unused parts Init and Batteries.

Test result: 👍 accepted · exit code 0 · wall time: 1.3 m · instructions: 465.8 G · max rss memory: 4.9 GB

stdout:
lean 4.34.1, export format 3.1.0, 15316782 lines
checked 148832 constants ({AXIOM=16, DEF=59020, THM=80860, OPAQUE=1382, QUOT=4}) and 1921 inductive blocks in 77.84s
axioms declared: propext, Quot.sound, Classical.choice, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.msPerDay_toInt._native.native_decide.ax_1_1, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.msPerDay_eq._native.native_decide.ax_1_1, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.toInt_div_msPerDay._native.native_decide.ax_1_1, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.toInt_div_msPerDay._native.native_decide.ax_1_3, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.toInt_div_msPerDay._native.native_decide.ax_1_6, _private.Cedar.Data.Int64.0.Int64.toInt_neg_of_not_ge_zero._native.native_decide.ax_1_2, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.toDate_eq_smod._native.native_decide.ax_1_8, _private.Cedar.Thm.SymCC.Data.Ext.0.Cedar.Thm.toDate_eq_smod._native.native_decide.ax_1_6, _private.Cedar.Data.Int64.0.Int64.toInt_nonneg_of_ge_zero._native.native_decide.ax_1_1, Lean.trustCompiler, Lean.ofReduceNat, sorryAx, Lean.ofReduceBool
all declarations verified
stderr:
... 1024 items, at THM Nat.lt_of_sub_ne_zero
... 2048 items, at THM _private.Init.Data.Array.Basic.0.PSigma.casesOn._arg_pusher
... 3072 items, at THM Std.DHashMap.Internal.Raw?.Const.alter?._proof_3
... 4096 items, at DEF Std.DTreeMap.Internal.Impl.insertMin.match_1
... 5120 items, at THM List.toByteArray.match_1.congr_eq_2
... 6144 items, at DEF Cedar.Data.Map.find?
... 7168 items, at THM Cedar.Thm.typeOf_term_some
... 8192 items, at THM List.find?_map
... 9216 items, at THM String.Slice.Pos.ofSliceFrom._proof_1
... 10240 items, at DEF String.Pos.nextn
... 11264 items, at THM Std.DTreeMap.Internal.Impl.ordered_insertIfNew
... 12288 items, at THM Std.ExtTreeMap.getKey_eq_getKey!
... 13312 items, at DEF Lean.Meta.State.mctx
... 14336 items, at DEF List.mapIdx
... 15360 items, at DEF Lean.instInhabitedPosition
... 16384 items, at DEF Std.DHashMap.Internal.AssocList.getD._f
... 17408 items, at DEF List.intersperse._f
... 18432 items, at THM Rat.neg_divInt_neg
... 19456 items, at DEF Cedar.Validation.TypedExpr.or.noConfusion
... 20480 items, at THM Cedar.Thm.type_of_mem_inversion
... 21504 items, at THM Nat.ToInt.natCast_ofNat
... 22528 items, at DEF BitVec.instDecidableForallBitVec.match_1
... 23552 items, at DEF Lean.Parser.ParserState.shrinkStack
... 24576 items, at THM _private.Init.Data.Array.QSort.Basic.0.Array.qpartition._proof_17
... 25600 items, at DEF Cedar.Data.instInhabitedSet
... 26624 items, at THM _private.Std.Data.DHashMap.Internal.RawLemmas.0.Std.DHashMap.Internal.Raw?.filter_equiv_congr._simp_1_1
... 27648 items, at DEF Lean.mkFreshId
... 28672 items, at DEF _private.Lean.Meta.Tactic.Simp.Types.0.Lean.Meta.Simp.dandThen.match_1
... 29696 items, at THM String.Pos.ofSliceTo_lt_ofSliceTo_iff
... 30720 items, at DEF Lean.Macro.State.macroScope
... 31744 items, at THM Std.DTreeMap.Internal.Impl.Const.insertManyIfNewUnit_list_equiv_foldl
... 32768 items, at DEF _private.Cedar.Thm.SymCC.Term.WF.0.Cedar.Thm.wf_datetime_toDate.match_1_8
... 33792 items, at THM Std.DHashMap.size_le_size_erase
... 34816 items, at THM Std.Rxc.Iterator.isPlausibleSuccessorOf_iff
... 35840 items, at THM List.append_right_eq_self._simp_1
... 36864 items, at DEF Cedar.Thm.term_prim_value?_some_implies_ws.match_1_3
... 37888 items, at THM _private.Cedar.Thm.SymCC.Enforcer.Extractor.0.Cedar.Thm.type_of_ancestor_uuf_eq._simp_1_2
... 38912 items, at THM _private.Cedar.Thm.SymCC.Compiler.Record.0.Cedar.Thm.compile_evaluate_ihs._simp_1_6
... 39936 items, at DEF _private.Init.Data.Iterators.Lemmas.Combinators.Monadic.FlatMap.0.Std.IterM.step_flattenAfter.match_1
... 40960 items, at DEF Cedar.Spec.defaultEidOf
... 41984 items, at THM Std.DTreeMap.Equiv.forIn_eq
... 43008 items, at THM Std.DHashMap.Internal.Raw?.getKey_congr
... 44032 items, at THM BitVec.sshiftRight_eq_of_msb_true
... 45056 items, at THM BitVec.add_eq_or_of_and_eq_zero
... 46080 items, at THM Lean.Grind.CommRing.Poly.denote_mulConstC
... 47104 items, at THM Std.DHashMap.Internal.Raw?.filterMap?.eq_1
... 48128 items, at THM _private.Std.Data.DHashMap.Internal.RawLemmas.0.Std.DHashMap.Internal.Raw?.Const.any_eq_false._simp_1_3
... 49152 items, at THM Int.Internal.Linear.Poly.denote_combine
... 50176 items, at OPAQUE _private.Lean.CompactedRegion.0.Lean.CompactorSpec
... 51200 items, at THM Std.DTreeMap.Raw.Const.mem_alter
... 52224 items, at THM Int.Internal.Linear.diseq_coeff
... 53248 items, at THM Std.DTreeMap.Internal.Impl.minKeyD_eq_fallback
... 54272 items, at DEF Lean.Doc.Parser.instBEqUnorderedListType
... 55296 items, at DEF Subsingleton.casesOn
... 56320 items, at THM BitVec.getElem_shiftConcat
... 57344 items, at DEF _private.Lean.Meta.Basic.0.Lean.Meta.exposeRelevantUniverses.match_1
... 58368 items, at THM Lean.KeyedDeclsAttribute.OLeanEntry.mk.inj
... 59392 items, at THM _private.Init.Data.Array.Lemmas.0.Array.getElem_zipWith._proof_3
... 60416 items, at THM Std.Internal.List.getKeyD_eraseKey_self
... 61440 items, at THM _private.Init.Data.Array.Lemmas.0.Array.not_mem_of_not_mem_push._simp_1_1
... 62464 items, at DEF Lean.Elab.Level.State.mk.noConfusion
... 63488 items, at DEF Lean.isCasesOnRecursor
... 64512 items, at DEF _private.Std.Time.Zoned.Database.TZdb.0.Std.Time.Database.TZdb.resolveLocalPath.match_1
... 65536 items, at THM Cedar.SymCC.UnaryFunction.uuf.inj
... 66560 items, at THM Std.HashMap.getKey!_unitOfList_of_mem
... 67584 items, at THM Std.HashSet.mem_of_mem_insert'
... 68608 items, at DEF Cedar.Spec.instCoeEntityUIDResidual
... 69632 items, at THM Lean.Grind.AC.Seq.unionFuel.match_1.congr_eq_4
... 70656 items, at DEF Lean.Parser.Term.funStrictImplicitBinder.parenthesizer
... 71680 items, at THM _private.Init.Data.Char.Lemmas.0.Char.toNat_inj._simp_1_2
... 72704 items, at DEF Lean.Parser.Tactic.vcgen
... 73728 items, at THM _private.Std.Data.DHashMap.Internal.RawLemmas.0.Std.DHashMap.Internal.Raw?.Const.any_keys._simp_1_1
... 74752 items, at DEF Lean.Lsp.instToJsonRegistration.toJson
... 75776 items, at THM Int.Internal.Linear.OrOver.eq_1
... 76800 items, at THM Std.ExtTreeSet.mem_of_get_eq
... 77824 items, at DEF Lean.Grind.Linarith.instBEqExpr
... 78848 items, at DEF BitVec.ofBoolListBE._f
... 79872 items, at DEF Lean.Lsp.WorkspaceEditClientCapabilities.casesOn
... 80896 items, at THM UInt8.eq_of_toFin_eq
... 81920 items, at DEF Std.Time.Year.classify
... 82944 items, at THM Std.HashMap.Raw.mem_alter_of_beq_eq_false
... 83968 items, at THM String.Pos.find?_prop_eq_find?_decide
... 84992 items, at THM List.count_range
... 86016 items, at THM Std.DTreeMap.Internal.Impl.Const.get?_union_of_contains_eq_false_right
... 87040 items, at THM Std.Rcc.mem_succ_succ_iff
... 88064 items, at DEF Lean.Lsp.CompletionItem.tags?
... 89088 items, at THM Std.Internal.List.getValue_insertListConst_of_contains_eq_false
... 90112 items, at THM Int64.ofBitVec_toBitVec
... 91136 items, at THM Vector.finIdxOf?_toList
... 92160 items, at THM _private.Init.Data.Order.PackageFactories.0.Std.LinearPreorderPackage.ofOrd._simp_2
... 93184 items, at DEF Lean.Parser.Tactic.MCasesPat.brecOn_1
... 94208 items, at DEF _private.Lean.Elab.AutoBound.0.Lean.Elab.checkValidAutoBoundImplicitName.match_1
... 95232 items, at DEF _private.Lean.Meta.HaveTelescope.0.Lean.Meta.SimpHaveResult.toResult
... 96256 items, at DEF _private.Init.Data.Nat.Fold.0.Nat.dfoldRev.match_1
... 97280 items, at DEF Lean.Elab.InlayHint.ctorIdx
... 98304 items, at THM Int8.le_iff_toBitVec_sle
... 99328 items, at DEF Lean.popScope
... 100352 items, at DEF Lean.Parser.Tactic.MRefinePat._sizeOf_2
... 101376 items, at DEF Std.Time.TimeZone.instReprLocalTimeType.repr
... 102400 items, at DEF Lean.Parser.Term.doForDecl.parenthesizer
... 103424 items, at DEF List.foldrIdxTR
... 104448 items, at DEF Lean.Doc.Parser.BlockCtxt.ctorIdx
... 105472 items, at THM Std.Time.Database.TZdb.mk.sizeOf_spec
... 106496 items, at DEF Std.Time.DayPeriod._sizeOf_1
... 107520 items, at DEF Lean.Data.AC.EvalInformation.noConfusionType
... 108544 items, at THM Std.HashMap.not_mem_empty
... 109568 items, at THM _private.Cedar.Validation.Levels.0.Cedar.Validation.extHasAttrChainCost._sparseCasesOn_10.else_eq
... 110592 items, at THM Std.ExtDHashMap.get?_eq_some_getD_of_contains
... 111616 items, at DEF Lean.CollectFVars.State.mk.noConfusion
... 112640 items, at DEF Lean.Parser.Command.exit
... 113664 items, at THM List.disjoint_cons_left
... 114688 items, at THM _private.Std.Data.Iterators.Lemmas.Combinators.Zip.0.Std.Iter.toList_zip_of_finite_right._simp_1_5
... 115712 items, at THM _private.Std.Data.ExtTreeMap.Lemmas.0.Std.ExtTreeMap.alter_eq_empty_iff_erase_eq_empty._simp_1_1
... 116736 items, at THM Lean.IR.Alt.default.inj
... 117760 items, at THM Std.ExtDTreeMap.maxKey!_eq_iff_getKey?_eq_self_and_forall
... 118784 items, at DEF _private.Lean.Elab.Tactic.BuiltinTactic.0.Lean.Elab.Tactic.getCaseGoals.mkSuggestions
... 119808 items, at THM Lean.RecursorRule.mk.inj
... 120832 items, at THM String.Slice.isEmpty_dropWhile_takeWhile
... 121856 items, at THM _private.Lean.Level.0.Lean.Level.geq.go._unary._proof_3
... 122880 items, at OPAQUE Lean.displayCumulativeProfilingTimes
... 123904 items, at THM Vector.countP_cast
... 124928 items, at THM _private.Init.Data.List.Nat.Modify.0.List.eraseIdx_modify_of_eq._proof_1_1
... 125952 items, at DEF Std.Time.Hour.instLTOrdinal._aux_1
... 126976 items, at DEF _private.Lean.Meta.Tactic.Injection.0.Lean.Meta.injectionCore._sparseCasesOn_4
... 128000 items, at THM _private.Init.Data.Fin.Lemmas.0.Fin.zero_eq_one_iff._simp_1_1
... 129024 items, at DEF Lean.Parser.LeadingIdentBehavior.recOn
... 130048 items, at THM Std.DTreeMap.Raw.self_le_maxKeyD_insertIfNew
... 131072 items, at THM Std.ExtDHashMap.get!_modify_self
... 132096 items, at THM BitVec.sshiftRight_eq_sshiftRightRec
... 133120 items, at DEF Lean.Lsp.instFromJsonLeanModuleHierarchyImportedByParams
... 134144 items, at THM Std.Iter.forIn_eq
... 135168 items, at THM Std.DTreeMap.Raw.Equiv.minKey?_eq
... 136192 items, at DEF _private.Lean.Data.KVMap.0.Lean.KVMap.mergeBy.match_1
... 137216 items, at THM Cedar.Spec.Value.record?.eq_2
... 138240 items, at THM Lean.Elab.Term.Quotation.Precheck.Context.mk.inj
... 139264 items, at DEF Lean.Lsp.LeanImport.recOn
... 140288 items, at DEF Std.Time.Week.OfYear.instInhabitedOrdinal
... 141312 items, at THM ite_then_not_self
... 142336 items, at THM Std.IterM.toListRev_mapWithPostcondition_mapWithPostcondition

Test "con-leche"

Expected: 👍 accept · Size: 525.9 MB · Lines: 10.0 M · lean4export: 3.1.0 · Lean: 4.33.0 · 📄 Declaration · 🔗 Source

The con-leche development's three theorems: the consistency proof of its verified checker — model_exists, every environment the checker accepts has a set-theoretic model, and its corollary no_proof_of_False, no proof of False is accepted — and the equivalence of its byte-level parser with a naive reference (scanLineSpec_eq_scanLineFwd), each with its dependency cone.

Test result: 👍 accepted · exit code 0 · wall time: 53.2 s · instructions: 361.6 G · max rss memory: 4.7 GB

stdout:
lean 4.33.0, export format 3.1.0, 10043114 lines
checked 27959 constants ({AXIOM=3, DEF=11486, THM=14983, OPAQUE=10, QUOT=4}) and 333 inductive blocks in 52.79s
axioms declared: propext, Quot.sound, Classical.choice
all declarations verified
stderr:
... 1024 items, at DEF _private.Init.Data.Nat.Bitwise.Lemmas.0.Nat.exists_testBit_ne_of_ne.match_1_1
... 2048 items, at THM BitVec.lt_def
... 3072 items, at THM _private.Init.Data.String.Decode.0.ByteArray.utf8DecodeChar?_eq_utf8DecodeChar?_extract._proof_1_9
... 4096 items, at DEF ConLeche.recRuleK
... 5120 items, at DEF ConLeche.ProjEntry.fireOk
... 6144 items, at DEF ConLeche.BasisDSL.u1N
... 7168 items, at DEF Std.DHashMap.Internal.bucket
... 8192 items, at DEF ConLeche.nativeFieldsOk.match_1
... 9216 items, at DEF _private.ConLeche.Verify.InferLemmas.0.ConLeche.inferTypeCore_lam_inv.match_1_16
... 10240 items, at THM _private.ConLeche.Verify.Cached.GuardsC.0.ConLeche.Expr.fvarLeavesGoC_spec._proof_1_26
... 11264 items, at DEF ConLeche.annotatePis.match_1
... 12288 items, at DEF _private.ConLeche.Verify.Extend.Iota.0.ConLeche.checkIotaRule_inv.match_1_26
... 13312 items, at DEF instSMulOfMul
... 14336 items, at THM _private.ConLeche.Model.Rules.RedSound.0.ConLeche.Model.Rules.Red.proj_sound._proof_1_2
... 15360 items, at DEF _private.ConLeche.Verify.InferLemmas.0.ConLeche.isUnitLikeTy_inv.match_1_33
... 16384 items, at THM ConLeche.Expr.constsResolve.eq_6
... 17408 items, at DEF _private.ConLeche.Model.BasisBlocks.0.ConLeche.Model.declBasisPB_natK.match_1_19
... 18432 items, at THM _private.ConLeche.Model.IndSubst.0.ConLeche.Model.AVExprSubst.inst_inst_comm._proof_1_14
... 19456 items, at DEF _private.Init.Data.List.Monadic.0.List.mapM'_eq_mapM.go._f
... 20480 items, at DEF ConLeche.Model.AnnotValid_mkPisAV_inv._f
... 21504 items, at DEF _private.ConLeche.Semantics.Tower.SumWire.0.ConLeche.Semantics.mkTowerGoUPos_below.match_1_1
... 22528 items, at THM ConLeche.Semantics.frP_of
... 23552 items, at THM ConLeche.Expr.fvarTysOk_fvar
... 24576 items, at THM _private.ConLeche.Model.Denotes.0.ConLeche.Model.Denotes_const_one
... 25600 items, at DEF _private.ConLeche.Frontend.Scan.Equiv.0.ConLeche.Frontend.naiveLineLoop.match_43.splitter
... 26624 items, at DEF _private.ConLeche.Frontend.Scan.Equiv.Objects.0.ConLeche.Frontend.scanIndDeclLoop.match_3.splitter

Test "corner-cases/alg-conv-trans-acc"

Expected: 🤷 either · Size: 66.4 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

As Lean's type theory has undecidable conversion (a.k.a. definitional equality), there are bound to be gaps between so called "algorithmic" conversion (that which is implemented by a typechecker), and the "declarative" conversion.

In the official kernel, algorithmic conversion fails to be transitive. f 1 a is a normal form: a is a variable, so Acc.rec cannot fire on it. Proof irrelevance admits any other proof of Acc (· < ·) 1 in its place, and Acc.intro 1 fun _ => Acc.inv a carries a constructor at the head, so it reduces. left is that substitution, right the reduction it unblocks, and trans chains the two.

acc asks for the endpoints on their own, which means inventing the middle term: choosing, among the proofs of a proposition, the one that happens to reduce the right way. The kernel has no reason to go looking, the left side being normal already, and unfolding regardless does not terminate here, as each step makes the term larger.

References:

  • Mario Carneiro, The Type Theory of Lean, MSc thesis

Test result: ✋ rejected · exit code 1 · wall time: 140 ms · instructions: 1.3 G · max rss memory: 72.5 MB

stdout:
REJECTED THM trans: declaration type mismatch, trans
  value has type: (? a : (Acc.{[1]} Nat (fun x1._@.Test.1043551373._hygCtx._hyg.6 : Nat => (fun x2._@.Test.1043551373._hygCtx._hyg.6 : Nat => (LT.lt.{[0]} Nat instLTNat #1 #0))) (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1))), (Eq.{[1]} Bool (f (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1)) #0) (f (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1)) #0)))
  but is expected to have type: (? a : (Acc.{[1]} Nat (fun x1._@.Test.1043551373._hygCtx._hyg.6 : Nat => (fun x2._@.Test.1043551373._hygCtx._hyg.6 : Nat => (LT.lt.{[0]} Nat instLTNat #1 #0))) (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1))), (Eq.{[1]} Bool (f (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1)) #0) (f (OfNat.ofNat.{[0]} Nat 0 (instOfNatNat 0)) (Acc.inv.{[1]} Nat (fun x1._@.Test.1043551373._hygCtx._hyg.6 : Nat => (fun x2._@.Test.1043551373._hygCtx._hyg.6 : Nat => (LT.lt.{[0]} Nat instLTNat #1 #0))) (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1)) (OfNat.ofNat.{[0]} Nat 0 (instOfNatNat 0)) #0 (Nat.lt_succ_self (OfNat.ofNat.{[0]} Nat 0 (instOfNatNat 0)))))))
lean 4.34.1, export format 3.1.0, 1176 lines
checked 66 constants ({DEF=23, THM=4}) and 12 inductive blocks in 0.06s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/alg-conv-trans-acc-left"

Expected: 🤷 either · Size: 67.4 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The creative half of corner-cases/alg-conv-trans-acc. Acc.rec is stuck on the variable a, and proof irrelevance admits any other proof of Acc (· < ·) 1 in its place, including one with a constructor at the head. Given both sides, a checker verifies this immediately; producing the right-hand side unprompted is the step no algorithm takes.

Test result: 👍 accepted · exit code 0 · wall time: 132 ms · instructions: 1.2 G · max rss memory: 72.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 1196 lines
checked 68 constants ({DEF=24, THM=5}) and 12 inductive blocks in 0.06s
axioms declared: none
all declarations verified

Test "corner-cases/alg-conv-trans-acc-right"

Expected: 🤷 either · Size: 67.6 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The mechanical half of corner-cases/alg-conv-trans-acc. With a constructor in the major premise, Acc.rec fires and step descends to the predecessor 0.

Test result: 👍 accepted · exit code 0 · wall time: 137 ms · instructions: 1.2 G · max rss memory: 72.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 1203 lines
checked 68 constants ({DEF=24, THM=5}) and 12 inductive blocks in 0.06s
axioms declared: none
all declarations verified

Test "corner-cases/alg-conv-trans-quot"

Expected: 🤷 either · Size: 8.5 KB · Lines: 169 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

left composed with right. Quotients of propositions cause algorithmic conversion transitivity to fail because the typechecker must creatively synthesise the representative of the quotient, and proof irrelevance is definitional.

References:

  • Mario Carneiro, The Type Theory of Lean, MSc thesis

Test result: ✋ rejected · exit code 1 · wall time: 115 ms · instructions: 706.0 M · max rss memory: 65.7 MB

stdout:
REJECTED THM trans: declaration type mismatch, trans
  value has type: (? P : Sort(0), (? r : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? ? : Sort(1), (? f : (? a : #2, #1), (? h : (? x : #3, (? y : #4, (? a._@._internal._hyg.0 : (#4 #1 #0), (Eq.{[1]} #4 (#3 #2) (#3 #1))))), (? q : (Quot.{[0]} #4 #3), (? z : #5, (Eq.{[1]} #4 (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 #1) (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 #1)))))))))
  but is expected to have type: (? P : Sort(0), (? r : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? ? : Sort(1), (? f : (? a : #2, #1), (? h : (? x : #3, (? y : #4, (? a._@._internal._hyg.0 : (#4 #1 #0), (Eq.{[1]} #4 (#3 #2) (#3 #1))))), (? q : (Quot.{[0]} #4 #3), (? z : #5, (Eq.{[1]} #4 (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 #1) (#3 #0)))))))))
lean 4.34.1, export format 3.1.0, 169 lines
checked 7 constants ({QUOT=4}) and 1 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/alg-conv-trans-quot-left"

Expected: 🤷 either · Size: 8.6 KB · Lines: 173 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Quot r is a Prop, so proof irrelevance relates q and Quot.mk r z. However the official kernel does WHNF first, reducing the right side to f z, so congruence never compares the arguments.

Test result: ✋ rejected · exit code 1 · wall time: 114 ms · instructions: 703.9 M · max rss memory: 66.1 MB

stdout:
REJECTED THM left: declaration type mismatch, left
  value has type: (? P : Sort(0), (? r : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? ? : Sort(1), (? f : (? a : #2, #1), (? h : (? x : #3, (? y : #4, (? a._@._internal._hyg.0 : (#4 #1 #0), (Eq.{[1]} #4 (#3 #2) (#3 #1))))), (? q : (Quot.{[0]} #4 #3), (? z : #5, (Eq.{[1]} #4 (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 #1) (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 #1)))))))))
  but is expected to have type: (? P : Sort(0), (? r : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? ? : Sort(1), (? f : (? a : #2, #1), (? h : (? x : #3, (? y : #4, (? a._@._internal._hyg.0 : (#4 #1 #0), (Eq.{[1]} #4 (#3 #2) (#3 #1))))), (? q : (Quot.{[0]} #4 #3), (? z : #5, (Eq.{[1]} #4 (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 #1) (Quot.lift.{[0, 1]} #6 #5 #4 #3 #2 (Quot.mk.{[0]} #6 #5 #0))))))))))
lean 4.34.1, export format 3.1.0, 173 lines
checked 7 constants ({QUOT=4}) and 1 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/alg-conv-trans-quot-left-def"

Expected: 🤷 either · Size: 10.5 KB · Lines: 208 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

left with Quot.lift behind a definition. WHNF does not unfold lift, so the arguments are compared and proof irrelevance applies.

Test result: 👍 accepted · exit code 0 · wall time: 111 ms · instructions: 630.1 M · max rss memory: 65.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 208 lines
checked 10 constants ({DEF=2, THM=1, QUOT=4}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "corner-cases/alg-conv-trans-quot-right"

Expected: 🤷 either · Size: 9.0 KB · Lines: 180 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Quotient computation rule.

Test result: 👍 accepted · exit code 0 · wall time: 114 ms · instructions: 662.8 M · max rss memory: 65.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 180 lines
checked 9 constants ({DEF=1, THM=1, QUOT=4}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "corner-cases/eta-ctor"

Expected: 🤷 either · Size: 9.0 KB · Lines: 148 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Function eta between a partially applied constructor and a free variable. The official kernel does not trigger eta expansion here, but a checker may accept the equality by expanding the functions. See https://github.com/leanprover/lean4/issues/12520 for a discussion; the official kernel may adopt eta-expansion of partially applied constructors, see https://github.com/leanprover/lean4/pull/15373. For a bug in a draft of that change, see bugs/eta-ctor-alias.

Test result: ✋ rejected · exit code 1 · wall time: 110 ms · instructions: 709.2 M · max rss memory: 65.7 MB

stdout:
REJECTED DEF etaCtor: declaration type mismatch, etaCtor
  value has type: (? a : (? proof : True, T), (Eq.{[1]} (? proof : True, T) #0 #0))
  but is expected to have type: (? x : (? proof : True, T), (Eq.{[1]} (? proof : True, T) (T.mk (T.val (#0 True.intro))) #0))
lean 4.34.1, export format 3.1.0, 148 lines
checked 14 constants ({DEF=1}) and 4 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-rec-struct"

Expected: 🤷 either · Size: 9.5 KB · Lines: 174 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Function eta between a recursor of a structure that is missing its major premise and a free variable.

Prod.rec (fun b c => a (b, c)) and a are convertible: eta-expanding the former gives fun p => Prod.rec (fun b c => a (b, c)) p, whose body reduces, by structure eta on p, to a (p.1, p.2), and that is convertible to a p. The official kernel eta-expands only when the other side is a lambda, so it rejects this, while it accepts the equation of each side with fun p => a p.

The same issue with a recursor with rule K is corner-cases/eta-rule-k. The official kernel may adopt eta-expansion of such partial recursor applications, see https://github.com/leanprover/lean4/pull/15374 and https://github.com/leanprover/lean4/issues/12520.

Test result: ✋ rejected · exit code 1 · wall time: 117 ms · instructions: 672.9 M · max rss memory: 66.1 MB

stdout:
REJECTED THM etaRecStruct: declaration type mismatch, etaRecStruct
  value has type: (? a : (? a._@._internal._hyg.0 : (Prod.{[0, 0]} Bool Bool), Bool), (Eq.{[1]} (? a._@._internal._hyg.0 : (Prod.{[0, 0]} Bool Bool), Bool) #0 #0))
  but is expected to have type: (? a : (? a._@._internal._hyg.0 : (Prod.{[0, 0]} Bool Bool), Bool), (Eq.{[1]} (? a._@._internal._hyg.0 : (Prod.{[0, 0]} Bool Bool), Bool) (Prod.rec.{[1, 0, 0]} Bool Bool (fun x._@.Test.3091511195._hygCtx._hyg.21 : (Prod.{[0, 0]} Bool Bool) => Bool) (fun b : Bool => (fun c : Bool => (#2 (Prod.mk.{[0, 0]} Bool Bool #1 #0))))) #0))
lean 4.34.1, export format 3.1.0, 174 lines
checked 10 constants ({}) and 3 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-rule-k"

Expected: 🤷 either · Size: 6.5 KB · Lines: 121 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Function eta between a partially applied recursor with rule K and a free variable. The official kernel does not trigger eta expansion here, but a checker may accept the equality by expanding the functions. See https://github.com/leanprover/lean4/issues/12520 for a discussion; the official kernel may adopt eta-expansion of such partial recursor applications, see https://github.com/leanprover/lean4/pull/15374. The same issue for a structure recursor is corner-cases/eta-rec-struct.

Test result: ✋ rejected · exit code 1 · wall time: 133 ms · instructions: 689.3 M · max rss memory: 65.0 MB

stdout:
REJECTED DEF etaRuleK: declaration type mismatch, etaRuleK
  value has type: (? a : (? a._@._internal._hyg.0 : (Eq.{[1]} Bool Bool.true Bool.true), Bool), (Eq.{[1]} (? a._@._internal._hyg.0 : (Eq.{[1]} Bool Bool.true Bool.true), Bool) #0 #0))
  but is expected to have type: (? a : (? a._@._internal._hyg.0 : (Eq.{[1]} Bool Bool.true Bool.true), Bool), (Eq.{[1]} (? a._@._internal._hyg.0 : (Eq.{[1]} Bool Bool.true Bool.true), Bool) (Eq.rec.{[1, 1]} Bool Bool.true (fun x._@.Test.1420384072._hygCtx._hyg.30 : Bool => (fun x._@.Test.1420384072._hygCtx._hyg.32 : (Eq.{[1]} Bool Bool.true #0) => Bool)) (#0 (Eq.refl.{[1]} Bool Bool.true)) Bool.true) #0))
lean 4.34.1, export format 3.1.0, 121 lines
checked 7 constants ({}) and 2 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-struct-major-and"

Expected: 🤷 either · Size: 9.4 KB · Lines: 175 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Structure eta on a recursor's major premise, for a structure in Prop.

And.rec f ⟨x.1, x.2⟩ reduces to f x.1 x.2. And.rec f x, with a variable x : P ∧ Q, also reduces to that if the major premise is expanded by structure eta, but the official kernel does not perform structure eta on majors whose type is a proposition, so it is stuck, and conversion is not transitive (or congruent) here.

Eta for such majors is fine for structures that eliminate into every sort, like And, whose fields are all proofs. It must not be done for propositions that eliminate only into Prop, like Exists, which have no projections. The official kernel may adopt this, see https://github.com/leanprover/lean4/pull/15371, https://github.com/leanprover/lean4/issues/3213 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Test result: ✋ rejected · exit code 1 · wall time: 122 ms · instructions: 710.7 M · max rss memory: 66.1 MB

stdout:
REJECTED THM andMajorEta: declaration type mismatch, andMajorEta
  value has type: (? P : Sort(0), (? Q : Sort(0), (? A : Sort(1), (? f : (? a._@._internal._hyg.0 : #2, (? a._@._internal._hyg.0 : #2, #2)), (? x : (And #3 #2), (Eq.{[1]} #2 (And.rec.{[1]} #4 #3 (fun x._@.Test.3893811644._hygCtx._hyg.27 : (And #4 #3) => #3) #1 #0) (And.rec.{[1]} #4 #3 (fun x._@.Test.3893811644._hygCtx._hyg.27 : (And #4 #3) => #3) #1 #0)))))))
  but is expected to have type: (? P : Sort(0), (? Q : Sort(0), (? A : Sort(1), (? f : (? a._@._internal._hyg.0 : #2, (? a._@._internal._hyg.0 : #2, #2)), (? x : (And #3 #2), (Eq.{[1]} #2 (And.rec.{[1]} #4 #3 (fun x._@.Test.3893811644._hygCtx._hyg.27 : (And #4 #3) => #3) #1 (And.intro #4 #3 (And.left #4 #3 #0) (And.right #4 #3 #0))) (And.rec.{[1]} #4 #3 (fun x._@.Test.3893811644._hygCtx._hyg.27 : (And #4 #3) => #3) #1 #0)))))))
lean 4.34.1, export format 3.1.0, 175 lines
checked 8 constants ({THM=2}) and 2 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-struct-major-and-no-whnf"

Expected: 🤷 either · Size: 24.0 KB · Lines: 421 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The combination of corner-cases/eta-struct-major-and and corner-cases/eta-struct-major-no-whnf.

andConst h is And.rec (fun _ _ => 1) h, applied here to a proof of True ∧ True that has no weak head normal form (built from Coquand's paradox, via propext). A checker that eta-expands the And major premise before reducing it accepts the equation with 1 immediately. A checker that first reduces the major premise does not terminate, and the official kernel today, which reduces the major and then does not eta-expand propositions, does not terminate either.

This shows why, once eta applies to majors in Prop, the expansion has to happen before reduction: proofs need not normalize, and otherwise that non-termination leaks into the conversion of data. See https://github.com/leanprover/lean4/pull/15351, https://github.com/leanprover/lean4/pull/15371 and https://github.com/leanprover/lean4/issues/14977.

Test result: ⌛ timeout · exit code -9 · wall time: 1.0 m · max rss memory: 0 B

stderr:
Killed after exceeding the timeout of 1.0 m.

Test "corner-cases/eta-struct-major-no-whnf"

Expected: 🤷 either · Size: 32.2 KB · Lines: 582 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Structure eta on a recursor's major premise, applied before trying to reduce the major to a constructor.

prodConst loopPair is Prod.rec (fun _ _ => 1) loopPair, and loopPair is an Acc.rec whose major premise is a proof with no weak head normal form (built from Coquand's paradox, via propext). A checker that first reduces the major premise to weak head normal form, as the official kernel does today, does not terminate here. Expanding the major premise to (loopPair.1, loopPair.2) first lets the recursor fire without ever looking at loopPair, and the equation with 1 holds.

The result of the reduction is the same either way (structure eta is part of the theory), so the question is only one of termination of the algorithm. The official kernel may adopt this order, see https://github.com/leanprover/lean4/pull/15351 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Test result: ⌛ timeout · exit code -9 · wall time: 1.0 m · max rss memory: 0 B

stderr:
Killed after exceeding the timeout of 1.0 m.

Test "corner-cases/eta-unit-like-nested"

Expected: 🤷 either · Size: 16.0 KB · Lines: 256 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit-like eta for a structure whose fields are proofs, Unit, and (after instantiating the parameters) a function into a unit-like structure.

The official kernel applies eta for unit-like types (any two inhabitants are convertible) only to structures without fields. With that criterion, conversion is not transitive: both p and q are convertible to the same canonical inhabitant (e.g. fun _ => () or ⟨()⟩), but not to each other. Extending the criterion to Pi types whose codomain is unit-like and to structures whose fields are all proofs or unit-like fixes that. The official kernel may adopt this, see https://github.com/leanprover/lean4/pull/15372, https://github.com/leanprover/lean4/issues/2258 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Test result: ✋ rejected · exit code 1 · wall time: 124 ms · instructions: 762.3 M · max rss memory: 66.2 MB

stdout:
REJECTED THM unitLikeNested: declaration type mismatch, unitLikeNested
  value has type: (? p : (Mixed Nat (? a._@._internal._hyg.0 : Bool, UnitField)), (? a : (Mixed Nat (? a._@._internal._hyg.0 : Bool, UnitField)), (Eq.{[1]} (Mixed Nat (? a._@._internal._hyg.0 : Bool, UnitField)) #0 #0)))
  but is expected to have type: (? p : (Mixed Nat (? a._@._internal._hyg.0 : Bool, UnitField)), (? q : (Mixed Nat (? a._@._internal._hyg.0 : Bool, UnitField)), (Eq.{[1]} (Mixed Nat (? a._@._internal._hyg.0 : Bool, UnitField)) #1 #0)))
lean 4.34.1, export format 3.1.0, 256 lines
checked 24 constants ({DEF=1}) and 7 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-unit-like-pi"

Expected: 🤷 either · Size: 5.6 KB · Lines: 101 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit-like eta for a function type: any two p q : α → Unit are equal.

The official kernel applies eta for unit-like types (any two inhabitants are convertible) only to structures without fields. With that criterion, conversion is not transitive: both p and q are convertible to the same canonical inhabitant (e.g. fun _ => () or ⟨()⟩), but not to each other. Extending the criterion to Pi types whose codomain is unit-like and to structures whose fields are all proofs or unit-like fixes that. The official kernel may adopt this, see https://github.com/leanprover/lean4/pull/15372, https://github.com/leanprover/lean4/issues/2258 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Test result: ✋ rejected · exit code 1 · wall time: 118 ms · instructions: 682.0 M · max rss memory: 65.5 MB

stdout:
REJECTED THM unitLikePi: declaration type mismatch, unitLikePi
  value has type: (? ? : Sort(1), (? p : (? a._@._internal._hyg.0 : #0, Unit), (? q : (? a._@._internal._hyg.0 : #1, Unit), (Eq.{[1]} (? a._@._internal._hyg.0 : #2, Unit) #0 #0))))
  but is expected to have type: (? ? : Sort(1), (? p : (? a._@._internal._hyg.0 : #0, Unit), (? q : (? a._@._internal._hyg.0 : #1, Unit), (Eq.{[1]} (? a._@._internal._hyg.0 : #2, Unit) #1 #0))))
lean 4.34.1, export format 3.1.0, 101 lines
checked 7 constants ({DEF=1}) and 2 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-unit-like-proof-field"

Expected: 🤷 either · Size: 6.5 KB · Lines: 111 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit-like eta for a structure in Type whose only field is a proof of True.

The official kernel applies eta for unit-like types (any two inhabitants are convertible) only to structures without fields. With that criterion, conversion is not transitive: both p and q are convertible to the same canonical inhabitant (e.g. fun _ => () or ⟨()⟩), but not to each other. Extending the criterion to Pi types whose codomain is unit-like and to structures whose fields are all proofs or unit-like fixes that. The official kernel may adopt this, see https://github.com/leanprover/lean4/pull/15372, https://github.com/leanprover/lean4/issues/2258 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Test result: ✋ rejected · exit code 1 · wall time: 107 ms · instructions: 685.4 M · max rss memory: 65.7 MB

stdout:
REJECTED THM unitLikeProofField: declaration type mismatch, unitLikeProofField
  value has type: (? p : ProofField, (? a : ProofField, (Eq.{[1]} ProofField #0 #0)))
  but is expected to have type: (? p : ProofField, (? q : ProofField, (Eq.{[1]} ProofField #1 #0)))
lean 4.34.1, export format 3.1.0, 111 lines
checked 9 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/eta-unit-like-struct"

Expected: 🤷 either · Size: 6.7 KB · Lines: 115 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit-like eta for a structure whose only field is of type Unit.

The official kernel applies eta for unit-like types (any two inhabitants are convertible) only to structures without fields. With that criterion, conversion is not transitive: both p and q are convertible to the same canonical inhabitant (e.g. fun _ => () or ⟨()⟩), but not to each other. Extending the criterion to Pi types whose codomain is unit-like and to structures whose fields are all proofs or unit-like fixes that. The official kernel may adopt this, see https://github.com/leanprover/lean4/pull/15372, https://github.com/leanprover/lean4/issues/2258 and the overall plan in https://github.com/leanprover/lean4/issues/14977.

Test result: ✋ rejected · exit code 1 · wall time: 127 ms · instructions: 701.8 M · max rss memory: 65.8 MB

stdout:
REJECTED THM unitLikeStruct: declaration type mismatch, unitLikeStruct
  value has type: (? p : UnitField, (? a : UnitField, (Eq.{[1]} UnitField #0 #0)))
  but is expected to have type: (? p : UnitField, (? q : UnitField, (Eq.{[1]} UnitField #1 #0)))
lean 4.34.1, export format 3.1.0, 115 lines
checked 10 constants ({DEF=1}) and 3 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/imax-right-successor"

Expected: 🤷 either · Size: 806 B · Lines: 21 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Universe-level normalization corner cases. The declarations use imax u 1 and imax u (v + 1) where their declared types use the corresponding max levels. A checker may reject these hand-crafted exports using a more conservative normalization, or accept them by recognizing that the right operand is nonzero.

Test result: 👍 accepted · exit code 0 · wall time: 99 ms · instructions: 545.1 M · max rss memory: 64.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 21 lines
checked 2 constants ({DEF=2}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "corner-cases/let-value-type-mismatch"

Expected: 🤷 either · Size: 601 B · Lines: 13 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

A let has a mismatched annotation, but substitution removes the mismatch.

In readable notation, the exported declaration is:

def EcosystemCase : Sort 2 := let u : Sort 1 := Sort 1; u

The value Sort 1 has type Sort 2, rather than the annotated Sort 1. Checking the supplied let can therefore reject it. Substituting its value for u gives def EcosystemCase : Sort 2 := Sort 1, whose types match.

This records the choice to check the supplied annotation or first simplify the let. The discussion of this exact example supports allowing either outcome as practical checker policy, while leaving a completely authoritative answer open. This is not a false-theorem example.

Test result: ✋ rejected · exit code 1 · wall time: 115 ms · instructions: 594.9 M · max rss memory: 65.2 MB

stdout:
REJECTED DEF EcosystemCase: let-value type mismatch for u
  value has type: Sort(2)
  expected: Sort(1)
lean 4.29.1, export format 3.1.0, 13 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/nested-nonuniform-param"

Expected: 🤷 either · Size: 9.2 KB · Lines: 142 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Checks that a parameter supplied to a nested inductive occurrence really acts as the datatype's parameter, i.e. that it is the parameter itself and does not change between recursive occurrences (as is already enforced for non-nested occurrences).

The inductive E : W → Type has constructor E.mk : (w : W) → L (E ⟨false⟩) → E w, where L (α : Type) is nested. The occurrence E ⟨false⟩ inside the nested L uses the constant ⟨false⟩ in the position of E's parameter, instead of the actual parameter w. That argument is type-correct, so it is not caught by merely type-checking the nested application (leanprover/lean4#14577); a correct checker must also verify that it is the expected parameter.

This particular declaration is not known to yield a proof of False: here L stores no value of type α, so the nested occurrence is phantom and E w is isomorphic to Unit for every w. The variant where L actually stores an α (so recursion would descend into an E ⟨false⟩ while the motive is fixed at E w) is already rejected by the kernel's positivity check ("non valid occurrence"). Since it is not a demonstrated unsoundness, it is not settled whether a checker should accept or reject it, so the expected outcome is either and the test does not count towards completeness or soundness.

Origin: raised by @arthur-adjedj on leanprover/lean4#14577 (https://github.com/leanprover/lean4/pull/14577#issuecomment-5101819377) as a case not covered by that PR's fix; related to leanprover/lean4#14576.

Test result: 👍 accepted · exit code 0 · wall time: 122 ms · instructions: 662.3 M · max rss memory: 65.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 142 lines
checked 14 constants ({}) and 4 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "corner-cases/positivity-whnf"

Expected: 🤷 either · Size: 4.7 KB · Lines: 81 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

A recursive occurrence appears in an unused argument of a reducible definition in a constructor field.

The declaration has the following shape:

def Ignore (A B : Type) : Type := A

inductive T : Type where
  | mk (f : Ignore Unit T -> T) : T

Ignore takes a second type argument but does not use it, so Ignore Unit T reduces to Unit. A checker that inspects the unreduced constructor field may reject the syntactic occurrence of T in the domain of the arrow. A checker that first weak-head-normalizes the field type may instead see (Unit -> T) -> T and accept it. The test therefore has outcome eithe r.

A checker may reject it syntactically or accept it after reducing the field type.

Test result: ✋ rejected · exit code 1 · wall time: 123 ms · instructions: 643.5 M · max rss memory: 65.4 MB

stdout:
REJECTED inductive LALReduciblePositivity: arg #1 of 'LALReduciblePositivity.mk' has a non positive occurrence of the datatypes being declared
lean 4.29.1, export format 3.1.0, 81 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/proj-maybe-prop"

Expected: 🤷 either · Size: 8.1 KB · Lines: 131 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a structure that may or may not be a proposition.

MaybeProp is a structure whose sort is a bare level parameter: a proposition for u := 0 and a data type for every other u. Lean's inductive command refuses to declare one ("the resulting universe is not Prop, but it may be Prop for some parameter values"), but the kernel accepts it. The exported definition projects out its first field, field : PUnit.{u}.

The official kernel accepts this. The field is not a proof for every u, but the projection is sound at every instantiation: MaybeProp.{u} is a proposition only for u := 0, and there the field's type PUnit.{0} is a proposition too. That is no coincidence. A structure that is not a Prop had every constructor field's universe checked against its resulting universe (see the tutorial's typeWithTooHighTypeField), here u ≤ u, and such an inequality survives instantiation — so wherever the structure does turn out to be a proposition, so do all of its fields.

At the same time, the official kernel here allows more projections than the recursor allows: MaybeProp.rec eliminates into Prop only, so this projection cannot be expressed through the recursor. The elaborator does not currently rely on this extra power, so for now it is reasonable for a checker to be more restrictive here and reject the projection — for example by asking "could this be a proposition?" and then demanding that the field be definitely a proof. See https://github.com/leanprover/lean4/issues/7637 for discussion.

Test result: 👍 accepted · exit code 0 · wall time: 133 ms · instructions: 679.5 M · max rss memory: 65.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 131 lines
checked 13 constants ({DEF=1}) and 4 inductive blocks in 0.05s
axioms declared: none
all declarations verified

Test "corner-cases/proj-maybe-prop-past"

Expected: 🤷 either · Size: 8.1 KB · Lines: 131 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The same as corner-cases/proj-maybe-prop, for a projection that only has to step over such a field.

MaybeProp.tail is a proof for every u, so the field asked for here is unobjectionable even under the restrictive reading. But reaching it means walking past field, which proof depends on, and that is where the check on a genuine proposition (the tutorial's projProp6) fires. A checker that rejects corner-cases/proj-maybe-prop therefore rejects this one as well, at field 0 rather than at field 2, and that remains a reasonable choice for the same reason. See https://github.com/leanprover/lean4/issues/7637 for discussion.

Test result: 👍 accepted · exit code 0 · wall time: 117 ms · instructions: 659.4 M · max rss memory: 65.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 131 lines
checked 13 constants ({DEF=1}) and 4 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "corner-cases/proof-param-ok"

Expected: 👍 accept · Size: 2.9 KB · Lines: 53 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Keeps two proof parameters in their declared order in an inductive constructor result.

Test result: 👍 accepted · exit code 0 · wall time: 111 ms · instructions: 535.0 M · max rss memory: 64.9 MB

stdout:
lean 4.29.1, export format 3.1.0, 53 lines
checked 3 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "corner-cases/proof-param-swap"

Expected: 🤷 either · Size: 2.9 KB · Lines: 53 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Swaps two proof parameters in an inductive constructor result. Checkers may either reject the swap or accept it using proof irrelevance.

Test result: ✋ rejected · exit code 1 · wall time: 103 ms · instructions: 609.8 M · max rss memory: 65.1 MB

stdout:
REJECTED inductive LALProofParameterSwap: invalid return type for 'LALProofParameterSwap.mk'
lean 4.29.1, export format 3.1.0, 53 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "corner-cases/subject-reduction-redex"

Expected: 🤷 either · Size: 66.6 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Test for subject reduction, as in Carneiro's thesis.

The annotation on the lambda writes the middle term of corner-cases/alg-conv-trans-acc down by hand, sparing the kernel from having to invent it. The body checks against right, the argument against left, and the two endpoints are never compared.

References:

  • Mario Carneiro, The Type Theory of Lean, MSc thesis

Test result: 👍 accepted · exit code 0 · wall time: 140 ms · instructions: 1.2 G · max rss memory: 71.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 1188 lines
checked 67 constants ({DEF=25, THM=6}) and 11 inductive blocks in 0.06s
axioms declared: none
all declarations verified

Test "corner-cases/subject-reduction-reduct"

Expected: 🤷 either · Size: 65.5 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Beta erases the annotation of corner-cases/subject-reduction-redex, and with it the middle term, leaving the two endpoints to compare: the conversion of corner-cases/alg-conv-trans-acc. A term the kernel accepts thus reduces to one it rejects.

References:

  • Mario Carneiro, The Type Theory of Lean, MSc thesis

Test result: ✋ rejected · exit code 1 · wall time: 152 ms · instructions: 1.2 G · max rss memory: 71.1 MB

stdout:
REJECTED DEF reduct: application type mismatch
  function head: _f580
  argument: _f581
  has type: (_f578 (f (OfNat.ofNat.{[0]} Nat 1 (instOfNatNat 1)) _f577))
  but is expected to have type: (_f578 (f (OfNat.ofNat.{[0]} Nat 0 (instOfNatNat 0)) (redex._proof_1 _f577)))
lean 4.34.1, export format 3.1.0, 1165 lines
checked 65 constants ({DEF=24, THM=5}) and 11 inductive blocks in 0.07s
axioms declared: none
1 declaration(s) rejected

Test "cslib"

Expected: 👍 accept · Size: 2.3 GB · Lines: 42.7 M · lean4export: 3.1.0 · Lean: 4.34.0 · 📄 Declaration · 🔗 Source

The Lean Computer Science Library (CSLib).

Test result: 👍 accepted · exit code 0 · wall time: 4.4 m · instructions: 1.8 T · max rss memory: 7.4 GB

stdout:
lean 4.34.0, export format 3.1.0, 42689984 lines
checked 394284 constants ({AXIOM=7, DEF=110882, THM=266747, OPAQUE=2314, QUOT=4}) and 4022 inductive blocks in 261.64s
axioms declared: propext, Quot.sound, Classical.choice, Lean.trustCompiler, Lean.ofReduceNat, sorryAx, Lean.ofReduceBool
all declarations verified
stderr:
... 1024 items, at DEF _private.Init.Data.Nat.Div.Basic.0.Nat.modCore_eq_mod.match_1_8
... 2048 items, at THM Lean.Data.AC.Context.toList_nonEmpty
... 3072 items, at THM Function.Injective.addMonoid._proof_4
... 4096 items, at inductive AddSubgroup
... 5120 items, at THM Equiv.addMonoid._proof_2
... 6144 items, at DEF npowRecAuto
... 7168 items, at THM Std.DTreeMap.Internal.Impl.inner.injEq
... 8192 items, at DEF ByteArray.utf8DecodeChar?.assemble?
... 9216 items, at DEF List.decidableLT
... 10240 items, at THM Pi.module._proof_1
... 11264 items, at THM _private.Mathlib.Data.Finset.Insert.0.Finset.coe_insert._proof_1_1
... 12288 items, at THM Matrix.instAddMonoidWithOne._proof_2
... 13312 items, at DEF Ordering.isEq
... 14336 items, at DEF _private.Init.Data.String.Decode.0.UInt8.isUTF8FirstByte_getElem_utf8EncodeChar.match_1_2
... 15360 items, at THM _private.Init.Data.Array.BinSearch.0.Array.binSearchAux._proof_5
... 16384 items, at THM List.foldl_append
... 17408 items, at THM exists_and_right._simp_1
... 18432 items, at THM CommGroupWithZero.zpow_zero'
... 19456 items, at THM Real.commRing._proof_2
... 20480 items, at THM Nonneg.semiring._proof_11
... 21504 items, at DEF Lean.Grind.AC.Seq.sort
... 22528 items, at THM Set.subset_univ._simp_1
... 23552 items, at DEF InitialSeg.total.match_1
... 24576 items, at DEF Subsemiring.mk'
... 25600 items, at DEF Std.PRange.UpwardEnumerable.LE
... 26624 items, at DEF _private.Init.Data.Int.Order.0.Int.eq_zero_of_dvd_of_natAbs_lt_natAbs.match_1_1
... 27648 items, at THM Submodule.span_eq
... 28672 items, at THM _private.Mathlib.Data.Fintype.EquivFin.0.Infinite.natEmbeddingAux.eq_def
... 29696 items, at THM instT1SpaceForall
... 30720 items, at THM Nat.strong_induction_on
... 31744 items, at DEF Equiv.natSumNatEquivNat
... 32768 items, at DEF instZeroUniformOnFun
... 33792 items, at THM _private.Mathlib.Topology.Instances.ENNReal.Lemmas.0.ENNReal.tendsto_mul._simp_1_2
... 34816 items, at THM MeasureTheory.measure_inter_add_sdiff
... 35840 items, at THM instIsTransGe
... 36864 items, at DEF Cslib.Logic.CLL.Proposition.dual
... 37888 items, at inductive Lean.JsonRpc.RequestID
... 38912 items, at DEF AddGroupNorm.toAddGroupSeminorm
... 39936 items, at THM Real.one_le_pi_div_two
... 40960 items, at THM one_div_mul_cancel
... 41984 items, at THM Set.subset_singleton_iff
... 43008 items, at THM Finsupp.mapDomain_single
... 44032 items, at THM Filter.liminf_const
... 45056 items, at DEF Array.find?
... 46080 items, at THM isCompactElement_iff_exists_finite_isAtom
... 47104 items, at THM _private.Mathlib.MeasureTheory.Integral.Bochner.Basic.0.MeasureTheory.L1.norm_eq_integral_norm._simp_1_2
... 48128 items, at DEF Lean.Server.RpcObjectStore.refsById
... 49152 items, at DEF Turing.Tape.right
... 50176 items, at DEF Relation.Comp
... 51200 items, at THM AddMonoid.FG.to_moduleFinite_int
... 52224 items, at THM instSMulZeroClass._proof_1
... 53248 items, at THM Nonneg.coeRingHom._proof_3
... 54272 items, at THM Multiset.inf_singleton
... 55296 items, at THM _private.Std.Data.Internal.List.Associative.0.Std.Internal.List.insertListIfNew_perm_insertList._simp_1_4
... 56320 items, at THM Nat.lt_of_add_right_lt
... 57344 items, at THM String.Slice.Pos.Splits.eq_left
... 58368 items, at DEF List.zipWithMAux_toArray_zero._f
... 59392 items, at THM Submodule.idemSemiring._proof_11
... 60416 items, at DEF Polynomial.toMvPolynomial
... 61440 items, at THM Unitization.instRing._proof_3
... 62464 items, at THM pow_succ_pos._simp_1
... 63488 items, at DEF Submonoid.topEquiv
... 64512 items, at THM Ideal.Quotient.groupWithZero._proof_5
... 65536 items, at THM instCompleteLinearOrderENat._proof_19
... 66560 items, at THM _private.Mathlib.LinearAlgebra.Multilinear.Basic.0.MultilinearMap.map_sum_finset_aux._simp_1_4
... 67584 items, at THM AnalyticWithinAt.continuousWithinAt
... 68608 items, at THM OrderedFinpartition.compAlongOrderedFinpartition?._proof_2
... 69632 items, at THM AffineMap.ext
... 70656 items, at DEF _private.Mathlib.Order.ConditionallyCompleteLattice.Finset.0.Finset.sup_eq_ciSup.match_1_1
... 71680 items, at THM ContinuousLinearMap.reApplyInnerSelf_smul
... 72704 items, at THM _private.Mathlib.Data.List.Cycle.0.List.next_getElem._proof_1_2
... 73728 items, at DEF _private.Lean.Message.0.Lean.instReprTraceResult.repr.match_1
... 74752 items, at DEF WithTop.conditionallyCompleteLattice
... 75776 items, at THM Lean.Order.instPartialOrderPProd._proof_1
... 76800 items, at DEF Prod.instHImp
... 77824 items, at THM QuotientGroup.Quotient.group._proof_6
... 78848 items, at DEF Nat.Internal.Linear.Poly.toExpr.go
... 79872 items, at DEF _private.Lean.Syntax.0.Lean.Syntax.isQuot.match_1
... 80896 items, at THM List.getElem_range
... 81920 items, at THM _private.Init.Data.List.Nat.InsertIdx.0.List.getElem_insertIdx_self._proof_1_1
... 82944 items, at DEF Cslib.Logic.CLL.Proof.one.elim
... 83968 items, at THM _private.Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Subtype.0.Cslib.LambdaCalculus.LocallyNameless.Fsub.Sub.weaken._proof_1_4
... 84992 items, at THM AddSubmonoid.coe_centralizer
... 86016 items, at THM eq_of_abs_sub_le_all
... 87040 items, at THM MvPolynomial.instIsCancelMulZeroOfIsCancelAdd
... 88064 items, at THM Sym2.lift._proof_5
... 89088 items, at THM EuclideanDomain.xgcd.eq_1
... 90112 items, at DEF _private.Lean.Environment.0.Lean.Environment.instBEqRealizeConstKey.beq.match_1
... 91136 items, at inductive Lean.Server.RefInfo
... 92160 items, at THM Equiv.mulRight_symm
... 93184 items, at DEF Lean.Parser.Tactic.Grind.thmNs
... 94208 items, at DEF Lean.Lsp.DeclInfo.rangeEndPosCharacter
... 95232 items, at THM MeasurableConstVAdd.measurable_const_vadd
... 96256 items, at THM Matrix.det_eq_sign_charpoly_coeff
... 97280 items, at THM affineSpan_le_of_subset_coe
... 98304 items, at THM Subring.center._proof_1
... 99328 items, at DEF mulHomOfTendsto
... 100352 items, at THM List.reduceOption_cons_of_some
... 101376 items, at THM _private.Std.Time.Time.HourMarker.0.Std.Time.HourMarker.toRelative._proof_3
... 102400 items, at THM OpenAddSubgroup.toAddSubgroup_injective
... 103424 items, at DEF Lean.Elab.AutoBoundImplicitContext.noConfusion
... 104448 items, at THM Cslib.LTS.IsSWBisimulation.isSimulation
... 105472 items, at THM _private.Cslib.Computability.Distributed.FLP.CanReachVia.0.Cslib.FLP.CanReachVia.subset_inp._proof_1_21
... 106496 items, at DEF _private.Lean.Meta.Tactic.Simp.BuiltinSimprocs.SInt.0.Int8.fromExpr.match_1
... 107520 items, at DEF Lean.Elab.Command.liftTermElabM
... 108544 items, at DEF Std.AtomicT
... 109568 items, at DEF Lean.Meta.Grind.Arith.Linear.RingDiseqCnstrProof.brecOn.go
... 110592 items, at THM Finset.coe_pow
... 111616 items, at DEF Plausible.Testable.instInhabitedOptionTOfPure
... 112640 items, at THM Int.not_odd_iff_even
... 113664 items, at THM _private.Init.Data.String.Lemmas.Pattern.String.ForwardSearcher.0.String.Slice.Pattern.Model.ForwardSliceSearcher.PartialMatch.partialMatch_of_le._proof_1_3
... 114688 items, at DEF Std.Do.PostShape.ctorIdx
... 115712 items, at DEF Lean.Meta.Grind.instInhabitedResult.default
... 116736 items, at DEF _private.Lean.Meta.Tactic.Grind.Split.0.Lean.Meta.Grind.selectNextSplit?.go.match_4
... 117760 items, at DEF Mathlib.Meta.FunProp.instInhabitedFunPropDecl.default
... 118784 items, at THM Option.merge_some_some
... 119808 items, at DEF Lean.rewriteManualLinksCore
... 120832 items, at THM List.findFinIdx?_eq_some_iff._simp_1
... 121856 items, at THM FormalMultilinearSeries.coeff_ofScalars
... 122880 items, at THM SMul.comp.smulCommClass'
... 123904 items, at THM ContinuousLinearMap.comp_toSpanSingleton
... 124928 items, at THM Filter.EventuallyEq.comp_tendsto
... 125952 items, at DEF Lean.Doc.DocArg.num.elim
... 126976 items, at THM _private.Cslib.Foundations.Semantics.LTS.Execution.0.Cslib.LTS.Execution.to_mTr._proof_1_51
... 128000 items, at DEF Nat.caseStrongRecOn
... 129024 items, at THM CompleteLatticeHom.id._proof_1
... 130048 items, at inductive Lean.Elab.Command.InductiveElabStep2
... 131072 items, at THM MeasureTheory.measure_support_eapprox_lt_top
... 132096 items, at THM MeasureTheory.Measure.count_apply_eq_top'
... 133120 items, at THM instWellFoundedLTAntisymmetrizationLe
... 134144 items, at DEF MonoidHom.toHomUnits
... 135168 items, at DEF Lean.Lsp.SemanticTokenModifier._sizeOf_1
... 136192 items, at DEF _private.Mathlib.Topology.Bases.0.IsOpenMap.separableSpace_of_injective.match_1_1
... 137216 items, at THM Lean.Meta.Grind.Arith.Cutsat.LeCnstrProof.combine.injEq
... 138240 items, at THM _private.Init.Data.Vector.InsertIdx.0.Vector.insertIdx_eraseIdx_of_ge._proof_5
... 139264 items, at THM Std.Rio.mem_toArray_iff_mem
... 140288 items, at THM pow_padicValNat_dvd
... 141312 items, at THM complementedLattice_of_isAtomistic
... 142336 items, at DEF CoeDep.ctorIdx
... 143360 items, at THM ChainCompletePartialOrder.IsExtremePt.map_le_of_mem_of_lt
... 144384 items, at DEF _private.Init.NotationExtra.0.Lean.expandExplicitBindersAux.match_3
... 145408 items, at DEF Lean.ShareCommon.PShareCommonT.run
... 146432 items, at THM UInt8.toUInt32_not
... 147456 items, at THM _private.Init.Data.String.Lemmas.Order.0.String.Slice.Pos.ofSlice_ne_startPos._simp_1_1
... 148480 items, at DEF FrameHom.comp
... 149504 items, at DEF BitVec.reduceGetMsb
... 150528 items, at THM Std.DTreeMap.Internal.Impl.Equiv.get_eq
... 151552 items, at THM CircularPreorder.sbtw_iff_btw_not_btw
... 152576 items, at THM AddEquiv.toIntLinearEquiv._proof_1
... 153600 items, at THM _private.Cslib.Computability.Machines.Turing.SingleTape.Deterministic.0.Cslib.Turing.SingleTapeTM.comp_right_relatesWithinSteps._proof_1_5
... 154624 items, at THM Std.Internal.List.maxKey!_eraseKey_eq_iff_beq_maxKey!_eq_false
... 155648 items, at DEF Aesop.Script.Tactic.mk.noConfusion
... 156672 items, at DEF _private.Mathlib.Tactic.Order.ToInt.0.Mathlib.Tactic.Order.ToInt.translateToInt.match_3
... 157696 items, at THM List.mem_sym2_iff
... 158720 items, at DEF Lean.Kernel.Exception.ctorElim
... 159744 items, at DEF _private.Lean.Meta.Tactic.Intro.0.Lean.MVarId.intro1_._sparseCasesOn_1
... 160768 items, at THM MulAut.characteristic._proof_5
... 161792 items, at DEF Lean.Elab.WF.GuessLex.SavedLocalContext.savedLocalContext
... 162816 items, at THM _private.Mathlib.Algebra.Order.GroupWithZero.Canonical.0.instLinearOrderedAddCommGroupWithTopAdditiveOrderDual._simp_3
... 163840 items, at DEF Lean.Meta.repeat1'
... 164864 items, at THM Subgroup.isClosed_of_isDiscrete
... 165888 items, at THM isRadical_iff_squarefree_or_zero
... 166912 items, at DEF Cslib.Mech.Expr.casesOn
... 167936 items, at THM Int.div_two_lt_floor
... 168960 items, at THM _private.Mathlib.LinearAlgebra.Basis.Fin.0.Module.Basis.mkFinCons._simp_3
... 169984 items, at THM Filter.EventuallyLE.countable_iUnion
... 171008 items, at THM covBy_iff_lt_iff_le_left
... 172032 items, at THM List.getI_cons_succ
... 173056 items, at DEF Std.Time.TimeZone.TZif.TZif.noConfusion
... 174080 items, at THM Sym.map_map
... 175104 items, at THM Function.disjoint_support_iff
... 176128 items, at THM ContinuousLinearEquiv.equivOfInverse'._proof_2
... 177152 items, at THM MvPolynomial.mem_degreesLE
... 178176 items, at THM existsUnique_zpow_near_of_one_lt
... 179200 items, at DEF Lean.Linter.UnusedVariables.References.fvarAliases
... 180224 items, at THM _private.Init.Data.SInt.Lemmas.0.ISize.toInt_ofNat_of_lt_two_pow_numBits._proof_1_1
... 181248 items, at THM Lean.Order.instCCPOOption._proof_1
... 182272 items, at THM restrictRootsOfUnity._proof_4
... 183296 items, at DEF Lean.PrettyPrinter.Delaborator.OptionsPerPos.setBool
... 184320 items, at THM Std.DTreeMap.Internal.Impl.Const.compare_minKeyD_modify_eq
... 185344 items, at THM IsTopologicalAddGroup.t1Space
... 186368 items, at DEF Lean.Compiler.LCNF.DeclValue.ctorIdx
... 187392 items, at THM Std.HashMap.get!_eq_getElem!
... 188416 items, at THM _private.Cslib.Languages.LambdaCalculus.LocallyNameless.Fsub.Typing.0.Cslib.LambdaCalculus.LocallyNameless.Fsub.Typing.narrow._proof_1_1
... 189440 items, at THM IsometryEquiv.withLpProdAssoc._proof_3
... 190464 items, at THM Std.ExtDHashMap.Const.get?_insert_self
... 191488 items, at THM OrderIso.mapSetOfPredMaximal._proof_8
... 192512 items, at THM StarMonoidHom.map_star'
... 193536 items, at THM AddSubsemigroup.centerToAddOpposite._proof_6
... 194560 items, at DEF Lean.Lsp.RenameOptions.noConfusionType
... 195584 items, at DEF rootsOfUnityUnitsMulEquiv
... 196608 items, at THM USize.mul_zero
... 197632 items, at THM _private.Mathlib.RingTheory.Multiplicity.0.FiniteMultiplicity.neg_iff._simp_1_1
... 198656 items, at DEF _private.Init.Data.List.Basic.0.List.getLast?.match_1.splitter
... 199680 items, at THM _private.Init.Data.BitVec.Bitblast.0.BitVec.msb_srem._simp_1_3
... 200704 items, at THM QuotientGroup.quotientQuotientEquivQuotientAux.eq_1
... 201728 items, at THM finsetBasisOfLinearIndependentOfCardEqFinrank.eq_1
... 202752 items, at THM Std.Iter.Intermediate.zip_inj
... 203776 items, at DEF Lean.Compiler.LCNF.ImpureType.Lean.Expr.isObj
... 204800 items, at THM WithTop.coe_top_lt
... 205824 items, at THM TopologicalSpace.Compacts.instRegularSpace
... 206848 items, at THM Cslib.?Language.flatten_mem_omegaPow
... 207872 items, at DEF Lean.PrettyPrinter.Delaborator.TopDownAnalyze.State.postponed
... 208896 items, at DEF Aesop.IndexMatchResult.noConfusion
... 209920 items, at DEF Std.Do.WP.mk.noConfusion
... 210944 items, at THM AlternatingMap.continuous_of_bound
... 211968 items, at DEF Subfield.gi
... 212992 items, at DEF AddMonoidAlgebra.sup_support_list_prod_le._f
... 214016 items, at THM List.countP_eq_length_filter'
... 215040 items, at THM Nat.binaryRec'_eq
... 216064 items, at DEF Mathlib.Tactic.Linarith.mulExpr
... 217088 items, at THM IntervalIntegrable.sum
... 218112 items, at THM UniformCauchySeqOn.add
... 219136 items, at DEF AddSubgroup.prodEquiv
... 220160 items, at THM Module.eval_ker
... 221184 items, at DEF PiNotation.piNotation.formatter
... 222208 items, at THM _private.Init.Data.String.Lemmas.Pattern.TakeDrop.Pred.0.String.Pos.apply_of_revSkipWhile_le_prop._simp_1_1
... 223232 items, at THM Dyadic.neg_zero
... 224256 items, at THM Std.ExtDHashMap.map_id_fun
... 225280 items, at THM String.Pos.le_sliceTo_iff
... 226304 items, at DEF Lean.Elab.Visibility._sizeOf_inst
... 227328 items, at DEF _private.Mathlib.Algebra.Order.SuccPred.0.Order.IsSuccPrelimit.add_natCast_lt.match_1_1
... 228352 items, at THM Std.DHashMap.getD_modify
... 229376 items, at THM NonUnitalSubsemiring.mk.inj
... 230400 items, at THM mabs_le_mabs_of_le_one
... 231424 items, at THM Asymptotics.IsBigO.of_norm_right
... 232448 items, at THM Ordinal.isSuccLimit_add
... 233472 items, at THM tendsto_add_const_cobounded
... 234496 items, at DEF Lean.Name.MatchUpToIndexSuffix.suffixMatch.noConfusion
... 235520 items, at THM EReal.coe_eq_one
... 236544 items, at DEF String.Slice.RevSplitIterator.instIteratorOfPure.match_1
... 237568 items, at THM Mathlib.Tactic.CancelDenoms.cancel_factors_ne
... 238592 items, at DEF Lean.StructureResolutionOrderConflict._sizeOf_1
... 239616 items, at DEF Mathlib.Meta.FunProp.applyPiRule
... 240640 items, at THM Finset.ite_one_prod
... 241664 items, at THM Vector.set.congr_simp
... 242688 items, at DEF _private.Mathlib.SetTheory.Cardinal.Ordinal.0.Ordinal.card_derivFamily_le.match_1_1
... 243712 items, at THM Subsemigroup.prod.eq_1
... 244736 items, at THM AddCommute.vadd_left_iff
... 245760 items, at DEF Aesop.ExtractScript.lazyStepsToSteps
... 246784 items, at THM PUnit.instOne_mathlib.eq_1
... 247808 items, at DEF Lean.Meta.instReprTransparencyMode.repr
... 248832 items, at THM IsIdempotentElem.add_sub_mul
... 249856 items, at DEF Mathlib.Tactic.GCongr.tacticRel[_]
... 250880 items, at DEF Lean.PrettyPrinter.Formatter.State.mk.noConfusion
... 251904 items, at THM Measurable.sup_const
... 252928 items, at THM _private.Lean.Parser.Extension.0.Lean.Parser.builtinParserCategoriesRef._proof_1
... 253952 items, at DEF Dyadic.instDecidableLE
... 254976 items, at THM lt_inv_mul_iff?'
... 256000 items, at DEF Mathlib.Tactic.Linarith.GlobalPreprocessor.noConfusionType
... 257024 items, at THM Module.Basis.mem_submodule_iff
... 258048 items, at THM Filter.eventuallyEq_inf_principal_iff
... 259072 items, at THM _private.Mathlib.Topology.MetricSpace.Thickening.0.Metric.thickening_nonempty_iff._simp_1_1
... 260096 items, at DEF Mathlib.Tactic.RingNF.instBEqRingMode
... 261120 items, at DEF Lean.instInhabitedNamePart.default
... 262144 items, at THM Cslib.Logic.CLL.Proposition.instDecidableEqContext.decEq._proof_13
... 263168 items, at DEF _private.Init.Data.BitVec.Lemmas.0.BitVec.flattenList.match_1.splitter
... 264192 items, at THM Std.TreeMap.minKey!_eq_head!_keys
... 265216 items, at THM Lean.Elab.Term.Context.mk.sizeOf_spec
... 266240 items, at THM MeasureTheory.Measure.ae_eq_or_eq_iff_map_eq_dirac_add_dirac
... 267264 items, at THM Prod.inf_def
... 268288 items, at THM Monoid.exponent_eq_zero_of_order_zero
... 269312 items, at DEF Lean.Json.Parser.finishSurrogatePair
... 270336 items, at DEF _private.Mathlib.Combinatorics.Enumerative.Stirling.0.Nat.stirlingFirst_eq_zero_of_lt.match_1_1
... 271360 items, at THM Finset.exists_ne_one_of_prod_ne_one
... 272384 items, at THM Std.ExtTreeSet.mem_filter
... 273408 items, at THM toIcoMod_sub_nsmul
... 274432 items, at THM Std.HashMap.Raw.get_inter
... 275456 items, at THM isRegular_unop
... 276480 items, at THM MeasureTheory.setIntegral_support
... 277504 items, at THM PUnit.instZero_mathlib.eq_1
... 278528 items, at DEF _private.Mathlib.Tactic.Ring.RingNF.0.Mathlib.Tactic.RingNF.instEvalTermBehaviorIfUnchanged.evalTerm
... 279552 items, at DEF Aesop.EqualUpToIds.GoalContext._sizeOf_1
... 280576 items, at DEF Lean.Meta.Sym.State._sizeOf_inst
... 281600 items, at THM toDual_inv
... 282624 items, at OPAQUE _private.Lean.Server.Completion.CompletionUtils.0.Lean.Server.Completion.minimizeGlobalIdentifierInContext.shortenInCurrentNamespace
... 283648 items, at DEF Lean.Grind.AC.instOfNatSeq_lean
... 284672 items, at THM Complex.cos_int_mul_two_pi_sub_pi
... 285696 items, at THM BoundedContinuousFunction.dist_le_two_norm
... 286720 items, at THM SpecializingMap.closure_singleton_subset
... 287744 items, at THM Std.Time.instDecidableEqHourMarker._proof_1
... 288768 items, at THM Fin.prod_Ici_cast
... 289792 items, at THM Std.DHashMap.Raw.isEmpty_insert
... 290816 items, at THM IsEmpty.toLocallyFiniteOrderBot.eq_1
... 291840 items, at THM Lean.ImportArtifacts.ofArrays.injEq
... 292864 items, at DEF Lean.Elab.Term.Quotation.HeadInfo._sizeOf_1
... 293888 items, at THM Array.sum_eq_foldl_int
... 294912 items, at THM Std.TreeMap.forIn_toList
... 295936 items, at THM _private.Std.Time.DateTime.PlainDateTime.0.Std.Time.PlainDateTime.dayOfYear._proof_1
... 296960 items, at THM exists_basis_of_pairing_eq_zero
... 297984 items, at THM Option.elim_apply
... 299008 items, at THM Ideal.IsPrime.multiset_prod_mem_iff_exists_mem
... 300032 items, at THM IsSMulRegular.pow_iff
... 301056 items, at THM RCLike.ofReal_nonpos
... 302080 items, at DEF Cslib.LambdaCalculus.LocallyNameless.Fsub.Term.term_?_?_???
... 303104 items, at THM Std.TreeMap.min?_keys
... 304128 items, at THM Set.toENat_cardinalMk
... 305152 items, at THM Subsemigroup.op.eq_1
... 306176 items, at THM AddSubgroup.map_eq_range_iff
... 307200 items, at THM List.swap.eq_1
... 308224 items, at DEF Lean.Doc.CodeSuggestion.noConfusionType
... 309248 items, at THM UInt8.neg_inj
... 310272 items, at THM Cardinal.mk_psigma_congrRight
... 311296 items, at DEF Aesop.instEmptyCollectionState
... 312320 items, at DEF Std.IterM.Total.ctorIdx
... 313344 items, at THM Subspace.dualCoannihilator_iInf
... 314368 items, at DEF Std.Rxo.LawfulHasSize.casesOn
... 315392 items, at THM Associates.out_zero
... 316416 items, at THM Flag.mk_coe
... 317440 items, at DEF Std.Time.Weekday.ofNat!
... 318464 items, at THM Cslib.LambdaCalculus.LocallyNameless.Stlc.Ty.arrow.sizeOf_spec
... 319488 items, at THM Colex.instMulOneClass._proof_1
... 320512 items, at THM Finset.piecewise_mem_Icc
... 321536 items, at THM Prod.instTorsor.eq_1
... 322560 items, at THM _private.Init.Data.UInt.Bitwise.0.UInt16.xor_eq_zero_iff._simp_1_1
... 323584 items, at THM isLocalExtrOn_const
... 324608 items, at THM DifferentiableWithinAt.of_finite
... 325632 items, at THM Mathlib.Tactic.UnfoldBoundary.UnfoldEntry.cast.inj
... 326656 items, at THM MeasureTheory.isProbabilityMeasureSMul
... 327680 items, at DEF _private.Batteries.Tactic.Alias.0.Batteries.Tactic.Alias.addAliasDocstring.match_1
... 328704 items, at DEF Lean.Parser.Tactic.Grind.paren
... 329728 items, at DEF NormalizedGCDMonoid.mk.noConfusion
... 330752 items, at THM small_iInter'
... 331776 items, at OPAQUE System.Platform.Internal.getHardwareConcurrency
... 332800 items, at DEF Aesop.EqualUpToIdsM.Context.mctx?
... 333824 items, at THM UInt64.le_iff_toFin_le
... 334848 items, at THM _private.Init.Data.BitVec.Lemmas.0.BitVec.toNat_shiftLeftZeroExtend._proof_1_5
... 335872 items, at DEF FBinopElab.instToExprSRec
... 336896 items, at THM Ordering.isGT_lt
... 337920 items, at THM Std.ExtHashMap.getKey?_modify
... 338944 items, at THM AddConjClasses.map.eq_1
... 339968 items, at DEF Aesop.VariableMap.mk.noConfusion
... 340992 items, at THM WithOne.instInvOneClass.eq_1
... 342016 items, at THM Std.IterM.Equiv.congr_simp
... 343040 items, at THM FreeMonoid.toList_nil
... 344064 items, at DEF Cslib.LTSCat._sizeOf_1
... 345088 items, at DEF Mathlib.Tactic.GCongr.Context.recOn
... 346112 items, at THM PFunctor.W.mk_dest
... 347136 items, at THM AddMonoidAlgebra.coeff_map
... 348160 items, at DEF DomAddAct.instAddCancelMonoidOfAddOpposite
... 349184 items, at THM mul_le_of_one_le_right
... 350208 items, at THM Language.iSup_sub
... 351232 items, at DEF String.next
... 352256 items, at DEF Lean.PrefixTreeNode.brecOn_2.go
... 353280 items, at THM tendstoLocallyUniformly_iff_forall_isCompact
... 354304 items, at THM Affine.Simplex.nonempty_closedInterior
... 355328 items, at THM _private.Mathlib.Algebra.Algebra.Spectrum.Basic.0.spectrum.zero_mem_resolventSet_of_unit._simp_1_3
... 356352 items, at DEF Lean.Lsp.instFileSourceWaitForDiagnosticsParams
... 357376 items, at THM DifferentiableOn.hasDerivAt
... 358400 items, at OPAQUE Lean.Parser.Tactic.instReprMCasesPat.repr
... 359424 items, at THM div_self_eq_one?
... 360448 items, at THM MonoidHom.compLeft.eq_1
slow (3700 ms): THM Polynomial.iterate_derivative_derivative_mul_X
... 361472 items, at THM Submodule.Quotient.equiv_refl
... 362496 items, at THM Std.TreeMap.self_le_maxKey!_insert
... 363520 items, at THM _private.Cslib.Computability.URM.Execution.0.Cslib.URM.Steps.preserves_register._proof_1_2
... 364544 items, at THM _private.Std.Data.ExtDHashMap.Lemmas.0.Std.ExtDHashMap.insertMany_list_eq_empty_iff._simp_1_4
... 365568 items, at THM Std.PreorderPackage.toLawfulOrderBEq
... 366592 items, at THM WithOne.map?_coe_right
... 367616 items, at THM Nonempty.elim_to_inhabited
... 368640 items, at THM Nat.card_plift
... 369664 items, at THM _private.Mathlib.Topology.ContinuousMap.Compact.0.ContinuousMap.nnnorm_sum_eq_sup._proof_1_3
... 370688 items, at THM StrictMono.sign_comp
... 371712 items, at DEF Lean.AttributeKind.noConfusion
... 372736 items, at THM DiscreteMeasurableSpace.toMeasurableSub
... 373760 items, at THM ENNReal.le_iInf_add_iInf
... 374784 items, at THM _private.Mathlib.LinearAlgebra.Matrix.PosDef.0.Matrix.PosDef.finite_setOfPred_dotProduct_mulVec_le._simp_1_4
... 375808 items, at THM Cslib.Mech.FunCallEval.EvalExpr.brecOn
... 376832 items, at DEF _private.Mathlib.Analysis.SpecialFunctions.Pow.NNReal.0.Mathlib.Meta.Positivity.evalNNRealRpow.match_1
... 377856 items, at THM Lean.Lsp.InlayHintTooltip.markdown.injEq
... 378880 items, at DEF termS(_,_)
... 379904 items, at THM LinearMap.coprod_comp_inl_inr
... 380928 items, at THM ENNReal.orderIsoRpow_apply
... 381952 items, at THM WithZero.coe_one
... 382976 items, at THM Quiver.homOfEq_heq_left_iff

Test "init"

Expected: 👍 accept · Size: 331.5 MB · Lines: 6.5 M · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The Init module export from Lean 4 core.

This test contains the fundamental building blocks of Lean 4, including:

  • Basic data types (Nat, List, Array, String, etc.)
  • Core tactics and syntax
  • Foundational mathematical structures
  • Essential metaprogramming infrastructure

This is one of the smallest meaningful test cases, making it ideal for initial checker validation and debugging.

Test result: 👍 accepted · exit code 0 · wall time: 29.1 s · instructions: 222.8 G · max rss memory: 4.3 GB

stdout:
lean 4.34.1, export format 3.1.0, 6487065 lines
checked 59626 constants ({AXIOM=7, DEF=15227, THM=42070, OPAQUE=247, QUOT=4}) and 615 inductive blocks in 28.77s
axioms declared: Classical.choice, propext, Quot.sound, Lean.trustCompiler, Lean.ofReduceNat, sorryAx, Lean.ofReduceBool
all declarations verified
stderr:
... 1024 items, at THM Nat.add_div_right
... 2048 items, at THM Option.get_dite
... 3072 items, at DEF Float.Model.UnpackedFloat.ctorIdx
... 4096 items, at THM Nat.pow_dvd_pow_iff_pow_le_pow
... 5120 items, at THM List.length_mapIdx
... 6144 items, at THM Nat.div_gcd_pos_of_pos_right
... 7168 items, at THM _private.Init.Data.String.Lemmas.Pattern.TakeDrop.String.0.String.Slice.startsWith_slice_iff._simp_1_1
... 8192 items, at DEF liftM
... 9216 items, at THM Int.Internal.Linear.Poly.denote_append
... 10240 items, at THM _private.Init.Data.Int.Order.0.Int.instLawfulOrderLT._simp_2
... 11264 items, at THM List.find?_toArray
... 12288 items, at DEF Sum.isRight
... 13312 items, at DEF String.Slice.Pattern.SearchStep.ctorIdx
... 14336 items, at THM Std.Internal.LawfulMonadLiftFunction.lift_map
... 15360 items, at DEF Array.mkArray5
... 16384 items, at DEF Std.Iterators.Types.Flatten.instIterator.match_3
... 17408 items, at THM LawfulApplicative.seq_pure
... 18432 items, at THM _private.Init.Data.String.Lemmas.Pattern.Basic.0.String.Slice.Pattern.Model.isLongestRevMatch_iff_isLongestRevMatchAt_ofSliceTo._simp_1_2
... 19456 items, at DEF Std.IterM.toList_filterMapWithPostcondition_filterMapWithPostcondition.match_1
... 20480 items, at THM Array.countP_reverse
... 21504 items, at THM List.countP_map
... 22528 items, at THM Int.Internal.Linear.of_var_eq_var_cert.eq_1
... 23552 items, at THM Int64.and_zero
... 24576 items, at DEF Lean.Meta.Occurrences._sizeOf_inst
... 25600 items, at THM List.findFinIdx?_eq_none_iff
... 26624 items, at THM Array.findIdx?.eq_1
... 27648 items, at THM Int32.and_neg_one
... 28672 items, at THM List.instAntisymmLeOfTrichotomousLt
... 29696 items, at THM Option.none_lt_some
... 30720 items, at THM String.Pos.Splits.pos_eq
... 31744 items, at THM String.Pos.not_lt_startPos
... 32768 items, at THM _private.Init.Data.List.Nat.Count.0.List.countP_replace._proof_1_6
... 33792 items, at THM _private.Init.Data.BitVec.Lemmas.0.BitVec.signExtend_extractLsb_setWidth._proof_1_3
... 34816 items, at THM Int.Internal.Linear.Poly.addConst_k.eq_1
... 35840 items, at DEF HMod.noConfusionType
... 36864 items, at THM Lean.Grind.CommRing.Expr.toPoly.eq_11
... 37888 items, at DEF String.startValidPos
... 38912 items, at THM Nat.toArray_roo_succ_succ
... 39936 items, at THM USize.ofNat.eq_1
... 40960 items, at THM Std.Rio.forIn'_eq_forIn'_toList
... 41984 items, at DEF Int.Internal.Linear.Expr.mulR.noConfusion
... 43008 items, at THM Std.Rcc.toArray.congr_simp
... 44032 items, at THM _private.Init.Data.Slice.Array.Lemmas.0.Subarray.size_mkSlice_rcc._simp_1_1
... 45056 items, at THM _private.Init.Data.Vector.InsertIdx.0.Vector.insertIdx_eraseIdx_of_le._proof_3
... 46080 items, at THM _private.Init.Data.SInt.Lemmas.0.Int16.sub_le._simp_1_1
... 47104 items, at THM List.isEqv_cons?
... 48128 items, at THM _private.Init.Data.Nat.Compare.0.Nat.compare_eq_eq._simp_1_2
... 49152 items, at THM Fin.natAdd_castAdd
... 50176 items, at THM _private.Init.Data.List.MinMaxIdx.0.List.maxIdxOn_le_of_apply_getElem_le_apply_maxOn._simp_1_2
... 51200 items, at THM _private.Init.Grind.Offset.0.Lean.Grind.Nat.lo_eq_true_of_lo._proof_1_1
... 52224 items, at THM Nat.gcd_dvd_gcd_mul_right_left
... 53248 items, at DEF Lean.Syntax._sizeOf_2
... 54272 items, at THM Lean.Grind.AC.Context.mk.sizeOf_spec
... 55296 items, at THM String.Slice.Pattern.CharPred.Decidable.instStrictForwardPatternForallCharProp
... 56320 items, at THM Fin.coeSucc_eq_succ
... 57344 items, at THM Int.add_neg

Test "init-prelude"

Expected: 👍 accept · Size: 3.6 MB · Lines: 64.1 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The Init.Prelude module export.

Test result: 👍 accepted · exit code 0 · wall time: 385 ms · instructions: 9.5 G · max rss memory: 174.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 64110 lines
checked 2106 constants ({AXIOM=3, DEF=1527, THM=154, OPAQUE=10, QUOT=4}) and 126 inductive blocks in 0.30s
axioms declared: Quot.sound, Classical.choice, sorryAx
all declarations verified
stderr:
... 1024 items, at DEF _private.Init.Prelude.0.USize.size_eq.match_1_1

Test "mathlib"

Expected: 👍 accept · Size: 5.8 GB · Lines: 109.8 M · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The complete Mathlib library export.

This test contains all the mathematical definitions, theorems, and proofs from Mathlib, representing the largest and most comprehensive test case in the Lean kernel arena.

Test result: 👍 accepted · exit code 0 · wall time: 23.1 m · instructions: 8.4 T · max rss memory: 11.7 GB

stdout:
lean 4.34.1, export format 3.1.0, 109790519 lines
checked 718577 constants ({AXIOM=7, DEF=179154, THM=513479, OPAQUE=2598, QUOT=4}) and 6798 inductive blocks in 1386.70s
axioms declared: propext, Quot.sound, Classical.choice, Lean.trustCompiler, Lean.ofReduceNat, sorryAx, Lean.ofReduceBool
all declarations verified
stderr:
... 1024 items, at DEF _private.Init.Data.Nat.Div.Basic.0.Nat.modCore_eq_mod.match_1_8
... 2048 items, at THM Lean.Data.AC.Context.toList_nonEmpty
... 3072 items, at DEF Equiv.instEquivLike
... 4096 items, at THM AddSubmonoid.mem_sInf
... 5120 items, at DEF MvPolynomial.aeval
... 6144 items, at inductive AddGroupWithOne
... 7168 items, at DEF AddAction.orbit
... 8192 items, at THM Finset.fold_insert
... 9216 items, at THM _private.Std.Data.DTreeMap.Internal.Operations.0.Std.DTreeMap.Internal.Impl.size_glue._proof_1_10
... 10240 items, at DEF _private.Init.Data.ByteArray.Bootstrap.0.List.toByteArray.match_1.splitter
... 11264 items, at DEF Std.TreeMap.Raw._auto_1
... 12288 items, at THM max_rec'
... 13312 items, at THM Pi.nonAssocSemiring._proof_2
... 14336 items, at THM Nat.eq_zero_of_gcd_eq_zero_left
... 15360 items, at THM CauSeq.sup_eq_right
... 16384 items, at DEF _private.Mathlib.Order.Filter.Map.0.Filter.map_le_iff_le_comap.match_1_1
... 17408 items, at THM AddGroup.existsAddOfLE
... 18432 items, at THM Set.mem_Ici._simp_1
... 19456 items, at THM SetRel.symmetrize_subset_self
... 20480 items, at THM invertibleMul._proof_2
... 21504 items, at THM AddSubmonoid.ext
... 22528 items, at THM Real.cos_pi_sub
... 23552 items, at THM Function.FactorsThrough.extend_apply
... 24576 items, at THM Function.argminOn_mem
... 25600 items, at THM Cardinal.mk_set_eq_one_iff
... 26624 items, at THM Function.Surjective.module._proof_1
... 27648 items, at THM LocalizedModule.liftOn_mk
... 28672 items, at THM DirectLimit.instMonoidWithZeroOfMonoidWithZeroHomClass._proof_2
... 29696 items, at THM _private.Mathlib.Data.Finset.Basic.0.Finset.erase_singleton._proof_1_1
... 30720 items, at DEF String.Pos.Raw.inc
... 31744 items, at DEF Lean.SimplePersistentEnvExtension.instInhabited._aux_1
... 32768 items, at THM TensorProduct.liftAux._proof_1
... 33792 items, at DEF SubsemiringClass.toNonAssocSemiring
... 34816 items, at THM SubfieldClass.toDivisionRing._proof_10
... 35840 items, at THM Module.Basis.toMatrix_mulVec_repr
... 36864 items, at DEF ModuleFilterBasis.topology
... 37888 items, at THM Finset.eq_empty_of_isEmpty
... 38912 items, at THM Multiset.rel_eq
... 39936 items, at THM HasFiniteFPowerSeriesAt._proof_1
... 40960 items, at THM UniformSpace.Completion.norm_coe
... 41984 items, at inductive PartialEquiv
... 43008 items, at THM HasDerivAt.congr_simp
... 44032 items, at DEF MDifferentiableAt
... 45056 items, at DEF _private.Mathlib.Order.Interval.Set.Infinite.0.NoMaxOrder.infinite.match_1
... 46080 items, at THM Polynomial.le_rootMultiplicity_iff
... 47104 items, at DEF TopCat.str
... 48128 items, at inductive CategoryTheory.Functor.EssSurj
... 49152 items, at DEF CategoryTheory.Adjunction.functorialityCounit
... 50176 items, at THM equivShrink_symm_zero
... 51200 items, at THM CategoryTheory.Limits.fullyFaithful_reflectsColimits
... 52224 items, at THM Finsupp.prod_fintype
... 53248 items, at DEF Lean.Expr.isAppOf
... 54272 items, at DEF Quiver.IsThin
... 55296 items, at DEF _private.Mathlib.Algebra.Homology.Localization.0.HomologicalComplexUpToQuasiIso.Qh.match_1
... 56320 items, at THM CochainComplex.HomComplex.Cochain.comp_assoc_of_first_is_zero_cochain
... 57344 items, at THM CochainComplex.HomComplex.Cocycle.homOf_ofHom_eq_self
... 58368 items, at THM CategoryTheory.ComposableArrows.Precomp.map_succ_succ._proof_2
... 59392 items, at THM CategoryTheory.ShortComplex.HomologyMapData.comm
... 60416 items, at THM _private.Mathlib.Algebra.FreeAlgebra.0.Algebra.adjoin_range_eq_range_freeAlgebra_lift._simp_1_3
... 61440 items, at THM CategoryTheory.Adjunction.unit_mono_of_L_faithful
... 62464 items, at THM CategoryTheory.Presieve.in_coverByImage
... 63488 items, at DEF FirstOrder.Language.LHom.onRelation._autoParam
... 64512 items, at THM Ideal.Quotient.field._proof_1
... 65536 items, at THM TopologicalSpace.exists_countable_basis
... 66560 items, at THM instBoundedGENhdsClassOrderDual
... 67584 items, at THM Set.iUnion_union_distrib
... 68608 items, at THM Finset.sup_eq_ciSup
... 69632 items, at THM Set.image2_iUnion_left
... 70656 items, at THM ENNReal.instAlgebraNNReal._proof_1
... 71680 items, at THM TensorProduct.LieModule.lie_tmul_right
... 72704 items, at THM _private.Mathlib.CategoryTheory.Limits.Preserves.Shapes.AbelianImages.0.CategoryTheory.Abelian.PreservesCoimage.hom_coimageImageComparison._simp_1_2
... 73728 items, at DEF Rep.leftRegularTensorTrivialIsoFree
... 74752 items, at DEF NumberField.instCommRingRingOfIntegers._aux_3
... 75776 items, at THM IsCoprime.pow_left
... 76800 items, at THM _private.Mathlib.Algebra.Group.Irreducible.Lemmas.0.irreducible_mul_units._simp_1_3
... 77824 items, at THM _private.Mathlib.Logic.Equiv.Prod.0.Equiv.prodCongrLeft._proof_1
... 78848 items, at DEF _private.Mathlib.RingTheory.SimpleModule.Basic.0.IsSemisimpleModule.exists_quotient_linearEquiv_submodule.match_1_1
... 79872 items, at DEF IsSimpleOrder.casesOn
... 80896 items, at THM DomMulAct.instDistribMulActionForallOfMulAction._proof_2
... 81920 items, at DEF _private.Mathlib.RingTheory.Ideal.Operations.0.Ideal.subset_union_prime'.match_1_1
... 82944 items, at THM _private.Mathlib.Logic.Equiv.Basic.0.Equiv.comp_swap_eq_update._proof_1_2
... 83968 items, at DEF Associates.out.match_1
... 84992 items, at THM MonoidHom.smulOneHom._proof_1
... 86016 items, at THM Nat.totient_eq_prod_factorization
... 87040 items, at THM Ideal.pow_inertiaDeg
... 88064 items, at DEF Subgroup.subgroupOfEquivOfLe
... 89088 items, at THM Equiv.Perm.apply_zpow_apply_eq_iff
... 90112 items, at THM isTopologicalBasis_isClopen
... 91136 items, at DEF SimplexCategory.instDecidableEqHom
... 92160 items, at THM _private.Init.Data.String.PosRaw.0.String.Pos.Raw.pos_iff_ne_zero._simp_1_1
... 93184 items, at THM MulActionHom.comp._proof_1
... 94208 items, at THM Unitary.conjStarAlgAut._proof_5
... 95232 items, at DEF StarSubalgebra.completeLattice
... 96256 items, at THM _private.Mathlib.MeasureTheory.Integral.MeanInequalities.0.ENNReal.funMulInvSnorm.eq_1
... 97280 items, at THM MeasureTheory.Measure.prod.instIsFiniteMeasure
... 98304 items, at THM MeasureTheory.integrableOn_const
... 99328 items, at THM _private.Mathlib.Order.Interval.Set.Basic.0.Set.Iic_sdiff_right._simp_1_1
... 100352 items, at THM mul_nonneg_iff_of_pos_right._simp_1
... 101376 items, at DEF instOrdBool._sparseCasesOn_2
... 102400 items, at DEF _private.Init.Data.Fin.Lemmas.0.Fin.exists_fin_one.match_1_1
... 103424 items, at DEF _private.Mathlib.Probability.Distributions.Gaussian.CharFun.0.ProbabilityTheory.isGaussian_iff_gaussian_charFunDual.match_1_1
... 104448 items, at DEF BotHom.instFunLike
... 105472 items, at DEF Lean.PrettyPrinter.Formatter.withAntiquot.formatter
... 106496 items, at THM CategoryTheory.Sieve.top_apply
... 107520 items, at THM Matrix.isNilpotent_charpoly_sub_pow_of_isNilpotent
... 108544 items, at THM Function.support_disjoint_iff
... 109568 items, at THM FDerivMeasurableAux.le_of_mem_A
... 110592 items, at DEF CategoryTheory.CountableCategory.objAsTypeEquiv
... 111616 items, at DEF Std.DTreeMap.Internal.Impl.Const.get??
... 112640 items, at DEF CategoryTheory.Iso.toLinearEquiv?
... 113664 items, at inductive Aesop.Stats
... 114688 items, at THM isPiSystem_Iic
... 115712 items, at THM StandardEtalePair.instCommRingRing._proof_30
... 116736 items, at DEF AlgEquiv.toAlgebraIso
... 117760 items, at THM _private.Mathlib.CategoryTheory.Sites.Coverage.0.CategoryTheory.Coverage.saturate_iff_saturate_toPrecoverage._proof_1_15
... 118784 items, at THM Matrix.vecMulBilin._proof_6
... 119808 items, at THM Std.DTreeMap.Internal.Impl.getEntry??_eq_getEntry?
... 120832 items, at THM CategoryTheory.GradedObject.isColimitCofan?MapBifunctorBifunctor??MapObj._proof_10
... 121856 items, at THM OrderAddMonoidIso.toMultiplicativeRight._proof_1
... 122880 items, at THM _private.Mathlib.Data.Nat.Factorization.PrimePow.0.Nat.mul_divisors_filter_prime_pow._simp_1_2
slow (3599 ms): THM AlgebraicGeometry.Proj.away?_comp_map
... 123904 items, at THM _private.Mathlib.Data.Finsupp.MonomialOrder.DegLex.0.Finsupp.DegLex.orderBot._simp_1
... 124928 items, at THM _private.Mathlib.Data.Set.Prod.0.Set.image_prodMk_subset_prod_right._proof_1_1
... 125952 items, at THM Set.image_comp_eq
... 126976 items, at THM LieModule.exists_forall_lie_eq_smul
... 128000 items, at THM LieAlgebra.IsKilling.chainLength._proof_5
... 129024 items, at DEF UpperHalfPlane.ofComplex
... 130048 items, at DEF _private.Mathlib.Topology.Homotopy.Lifting.0.IsLocalHomeomorph.exists_lift_nhds.match_1_1
... 131072 items, at THM List.getElem?_zipIdx
... 132096 items, at inductive Std.Iterators.Types.Take.PlausibleStep
... 133120 items, at THM InnerProductSpace.gramSchmidt._proof_1
... 134144 items, at THM SkewMonoidAlgebra.instAddCommMonoid._proof_2
... 135168 items, at THM Std.Sat.AIG.mkGateCached._proof_2
... 136192 items, at THM CategoryTheory.Limits.biproduct.toSubtype_?
... 137216 items, at THM WittVector.nth_mul_coeff'
... 138240 items, at THM Function.Embedding.optionEmbeddingEquiv._proof_8
... 139264 items, at DEF SimpleGraph.Walk.IsHamiltonian
... 140288 items, at THM RCLike.ofReal_pos
... 141312 items, at THM AlgebraicGeometry.Scheme.Hom.opensRange.congr_simp
... 142336 items, at THM _private.Mathlib.AlgebraicGeometry.Morphisms.QuasiSeparated.0.AlgebraicGeometry.exists_eq_pow_mul_of_isCompact_of_isQuasiSeparated._simp_1_2
... 143360 items, at DEF Std.Http.Internal.Char.isPChar
... 144384 items, at DEF RBTree.RBNode.append
... 145408 items, at THM PerfectClosure.R.sound
... 146432 items, at DEF Std.Tactic.BVDecide.BVUnOp.casesOn
... 147456 items, at THM Std.Tactic.BVDecide.BVExpr.bitblast.blastCpopTree.go_decl_eq
... 148480 items, at THM List.mem_iff_getElem?
... 149504 items, at DEF Polynomial.leval
... 150528 items, at DEF WeierstrassCurve.Jacobian.addX
... 151552 items, at THM AkraBazziRecurrence.eventually_bi_mul_le_r
... 152576 items, at DEF Polynomial.signVariations
... 153600 items, at DEF Function.FromTypes.uncurry
... 154624 items, at THM Algebra.traceMatrix.eq_1
slow (30404 ms): THM PresheafOfModules.freeObj._proof_2
... 155648 items, at THM WithZero.exp_ne_zero._simp_1
... 156672 items, at THM SubalgebraClass.val._proof_5
... 157696 items, at THM CongruenceSubgroup.Gamma0Map._proof_2
... 158720 items, at THM Filter.eventuallyEmptyOrUniv_iff
... 159744 items, at THM fourierCoeff.eq_1
... 160768 items, at DEF CategoryTheory.Hom.addGroup
... 161792 items, at THM FormalMultilinearSeries.derivSeries_eq_zero
... 162816 items, at THM prod_indicator
... 163840 items, at THM CategoryTheory.Monoidal.ComonFunctorCategoryEquivalence.functor._proof_3
... 164864 items, at THM Std.DHashMap.Internal.Raw.Const.get?_eq
... 165888 items, at THM CategoryTheory.IsKernelPair.of_hasPullback
... 166912 items, at THM contMDiffWithinAt_iff_target
... 167936 items, at DEF Lean.Meta.decLevel?
... 168960 items, at THM _private.Mathlib.Data.Finset.Option.0.Option.mem_toFinset._simp_1_1
... 169984 items, at DEF Nat.Internal.Linear.instInhabitedExpr
... 171008 items, at DEF CategoryTheory.Oplax.OplaxTrans.homCategory
... 172032 items, at THM CategoryTheory.Comma.essSurj_map
... 173056 items, at THM CStarMatrix.instNonUnitalNonAssocRing._proof_2
... 174080 items, at DEF Lean.Meta.forEachExpr'
... 175104 items, at THM DerivedCategory.instLinearShiftFunctorInt
... 176128 items, at THM WithZeroTopology.orderClosedTopology
... 177152 items, at DEF Stream'.interleave
... 178176 items, at DEF DiffeologicalSpace.casesOn
... 179200 items, at THM FiberBundleCore.trivChange._proof_3
... 180224 items, at THM CategoryTheory.SmallObject.SuccStruct.ofCocone.map._proof_5
... 181248 items, at THM _private.Mathlib.RingTheory.Spectrum.Prime.Topology.0.PrimeSpectrum.irreducibleSpace_iff_isPrime_nilradical._simp_1_2
... 182272 items, at THM Polynomial.not_isField
... 183296 items, at THM Polynomial.UniversalFactorizationRing.fromTensor_comp_universalFactorizationMap
slow (2646 ms): THM Algebra.exists_etale_isIdempotentElem_forall_liesOver_eq_aux?
... 184320 items, at THM CategoryTheory.Limits.punitConeIsLimit._proof_4
... 185344 items, at THM Polynomial.exists_mul_sq_add_linear_part_eq_eval_add
... 186368 items, at THM CategoryTheory.CommSq.fac_right_assoc
... 187392 items, at THM AlgebraicGeometry.Scheme.Modules.restrictFunctorCongr._proof_2
... 188416 items, at THM MeasureTheory.VectorMeasure.of_sdiff_of_sdiff_eq_zero
... 189440 items, at THM Ideal.quotientEquiv_symm_apply
... 190464 items, at THM strictMono_toDual_comp_iff
... 191488 items, at DEF _private.Lean.Elab.Term.TermElabM.0.Lean.Elab.Term.mkTypeMismatchError.match_1
... 192512 items, at DEF _private.Mathlib.Data.Seq.Computation.0.Computation.results_think_iff.match_1_1
... 193536 items, at DEF Int32.ofNat
... 194560 items, at THM ContinuousLinearMap.FredholmPackage.eq_equiv
... 195584 items, at THM OmegaCompletePartialOrder.?ScottContinuous.fun_id
... 196608 items, at DEF FreeSimplexQuiver.Hom.casesOn
... 197632 items, at THM CategoryTheory.Mon.instMonObjOfIsCommMonObjX._proof_6
... 198656 items, at THM CategoryTheory.Limits.IndizationClosedUnderFilteredColimitsAux.compYonedaColimitIsoColimitCompYoneda._proof_5
... 199680 items, at THM WittVector.coeff_frobeniusFun
... 200704 items, at DEF _private.Lean.Environment.0.Lean.Environment.realizeConst.match_3
... 201728 items, at THM _private.Mathlib.Analysis.Normed.Unbundled.SmoothingSeminorm.0.?_limsup_le_one._simp_1_1
... 202752 items, at DEF AlgebraicGeometry.Scheme.IdealSheafData.instSemilatticeInf
... 203776 items, at THM QuadraticAlgebra.trace_algHom_omega
... 204800 items, at THM _private.Mathlib.MeasureTheory.VectorMeasure.SetIntegral.0.MeasureTheory.VectorMeasure.hasSum_setIntegral_iUnion_nat._simp_1_21
... 205824 items, at THM _private.Mathlib.Probability.ProductMeasure.0.MeasureTheory.Measure.infinitePi_dirac._simp_1_2
... 206848 items, at THM WeierstrassCurve.Jacobian.dblU_eq
... 207872 items, at THM Matroid.isNonloop_iff
... 208896 items, at inductive CategoryTheory.Presieve.BindStruct
... 209920 items, at THM CategoryTheory.MorphismProperty.costructuredArrowObj_iff
... 210944 items, at THM MeasureTheory.upperCrossingTime_succ_eq
... 211968 items, at THM Equiv.piCongrSet._proof_1
... 212992 items, at THM MeasureTheory.upcrossingsBefore_zero
... 214016 items, at THM _private.Std.Tactic.BVDecide.LRAT.Internal.Formula.RupAddResult.0.Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.insertUnitInvariant_insertUnit._proof_1_7
... 215040 items, at THM Sylow.smul_eq_iff_mem_normalizer
... 216064 items, at THM AddMonoidAlgebra.supDegree_leadingCoeff_sum_eq
... 217088 items, at DEF Std.Http.URI.instToStringEncodedQueryString
... 218112 items, at THM ZSpan.volume_fundamentalDomain
... 219136 items, at THM List.findFinIdx?.go.eq_def
... 220160 items, at THM Valuation.IsRankOneDiscrete.generator_eq_exp_neg_one_of_surjective
... 221184 items, at THM Metric.inductivePremetric._proof_5
... 222208 items, at DEF Turing.TM1.stmts?._f
... 223232 items, at DEF _private.Init.Data.String.FindPos.0.String.Slice.Pos.prevn.match_1
... 224256 items, at THM CategoryTheory.ShortComplex.RightHomologyData.p_comp_opcyclesIso_inv
... 225280 items, at THM NumberField.mixedEmbedding.fundamentalCone.expMap_add
... 226304 items, at DEF instMonadAttachReaderTOfMonad
... 227328 items, at THM CompHausLike.productCone._proof_3
... 228352 items, at THM PointedCone.mem_dual._simp_1
... 229376 items, at THM _private.Mathlib.Data.Nat.Choose.Lucas.0.Choose.choose_modEq_choose_mod_mul_choose_div._simp_1_7
... 230400 items, at THM TensorProduct.gradedCommAux_comp_gradedCommAux
... 231424 items, at THM neg_le_self_iff._simp_1
... 232448 items, at THM Valuation.HasExtension.instAlgebra_valuationSubring._proof_5
... 233472 items, at THM IsSemisimpleModule.exists_end_algEquiv_pi_matrix_end
... 234496 items, at THM _private.Mathlib.Order.Fin.Tuple.0.Fin.snocOrderIso._simp_1
... 235520 items, at DEF Lean.Meta.Grind.AC.State.structs
... 236544 items, at DEF exteriorPower.presentation
... 237568 items, at THM GradedTensorProduct.auxEquiv_tmul
... 238592 items, at THM Std.ExtDHashMap.getKey.congr_simp
... 239616 items, at OPAQUE _private.Lean.Meta.Tactic.Cleanup.0.Lean.Meta.cleanupCore.addUsedFVars
... 240640 items, at DEF Lean.Meta.Grind.Arith.CommRing.mkUnaryFn
... 241664 items, at DEF Lean.Meta.RefinedDiscrTree.instInhabitedTrie
... 242688 items, at DEF SSet.Subcomplex.unionProd.??
... 243712 items, at THM Computable.pair
... 244736 items, at THM Set.mulIndicator_congr
... 245760 items, at THM USize.ofNatClamp.eq_1
... 246784 items, at DEF SSet.StrictSegal.spineToDiagonal
... 247808 items, at THM HomotopicalAlgebra.CofibrantObject.homRel_equivalence_of_isFibrant_tgt
... 248832 items, at THM CategoryTheory.ObjectProperty.instEssentiallySmallLimitsClosureOfSmallOfLocallySmall
... 249856 items, at DEF RingEquiv.sumArrowEquivProdArrow
... 250880 items, at DEF CategoryTheory.Abelian.SpectralObject.isIso_map_four??To??_of_isZero._auto_3
... 251904 items, at THM Fin.exists_fin_zero_pi._simp_1
... 252928 items, at THM CategoryTheory.Precoverage.ZeroHypercover.singleton._proof_2
... 253952 items, at THM NormedField.exists_nnnorm_lt_one
... 254976 items, at THM PiTensorProduct.liftIsometry_apply_apply
... 256000 items, at THM CategoryTheory.coherentTopology.equivalence'._proof_1
... 257024 items, at THM LipschitzWith.edist_lt_mul_of_lt
... 258048 items, at THM AlgebraicGeometry.Scheme.Opens.isoOfLE_hom_?
... 259072 items, at DEF _private.Lean.Elab.Tactic.Grind.Param.0.Lean.Elab.Tactic.processTermParam.match_8
... 260096 items, at DEF Lean.Meta.Grind.getEMatchTheoremNumInstances
... 261120 items, at THM Turing.ToPartrec.instDecidableEqCode.decEq._proof_32
... 262144 items, at THM HurwitzZeta.oddKernel_neg
... 263168 items, at THM _private.Init.Data.String.Lemmas.Iterate.0.String.Slice.Model.revPositionsFrom._proof_4
... 264192 items, at DEF CategoryTheory.MonoidalCategory.DayConvolutionUnit.?
... 265216 items, at THM _private.Mathlib.LinearAlgebra.AffineSpace.Centroid.0.Finset.centroid_vsub_const._proof_1_1
... 266240 items, at DEF Lean.Server.FileWorker.EditableDocumentCore.initSnap
... 267264 items, at THM IsLocalization.instSubmonoid
... 268288 items, at THM UpperHalfPlane.vadd_im
... 269312 items, at inductive CuspForm
... 270336 items, at THM PiTensorProduct.tmulEquivDep._proof_6
... 271360 items, at DEF Std.Time.Month.instSubOffset
... 272384 items, at THM Coalgebra.TensorProduct.rid._proof_2
... 273408 items, at DEF Set.OrdConnected.succOrder._aux_1
... 274432 items, at THM Std.Slice.mk.inj
... 275456 items, at DEF Mathlib.Tactic.Translate.ArgReorder.instBEq
... 276480 items, at THM AddEquiv.neg'._proof_1
... 277504 items, at THM ContMDiffMap.C._proof_1
... 278528 items, at THM TrivSqZeroExt.fst_add
... 279552 items, at THM CategoryTheory.Join.opEquiv._proof_18
... 280576 items, at THM WeakDual.toWeakDual_toStrongDual
... 281600 items, at THM ConvexOn.rightDeriv_eq_sInf_slope_of_mem_interior
... 282624 items, at THM MonomialOrder.degree_smul_of_isRegular
... 283648 items, at THM IsClopen.not_isPreconnected_iff
... 284672 items, at DEF CategoryTheory.AddMod.forget
... 285696 items, at DEF NumberField.Units.equivFinRank
... 286720 items, at DEF SimpleGraph.Walk.toPath
... 287744 items, at THM List.bidirectionalRec.eq_def
... 288768 items, at DEF Lean.NameHashSet.instEmptyCollection
... 289792 items, at THM WeierstrassCurve.Jacobian.dblZ_smul
... 290816 items, at THM _private.Mathlib.ModelTheory.Complexity.0.FirstOrder.Language.BoundedFormula.IsAtomic.realize_comp_of_injective._simp_1_3
... 291840 items, at DEF Lean.Server.instFromJsonIlean.fromJson
... 292864 items, at THM DihedralGroup.instGroup._proof_12
... 293888 items, at THM Metric.uniformContinuousOn_iff
... 294912 items, at THM LinearEquiv.prodAssoc._proof_1
... 295936 items, at DEF Lean.Elab.Command.NameGen.mkBaseNameWithSuffix'
... 296960 items, at DEF Lean.Grind.instToIntNatCiOfNatInt
... 297984 items, at DEF CategoryTheory.CardinalDirectedPoset.hasCardinalLTWithTerminal
... 299008 items, at THM _private.Mathlib.Geometry.Convex.Cone.Pointed.0.ConvexCone.toPointedCone._simp_3
... 300032 items, at DEF CategoryTheory.Bicategory.RetractArrow?.commi
... 301056 items, at THM IsPurelyInseparable.exponent_min'
... 302080 items, at DEF MaxTropical.instAdd
... 303104 items, at DEF Lean.Meta.Ext.ExtTheorem.priority
... 304128 items, at THM _private.Std.Tactic.BVDecide.LRAT.Internal.Formula.RupAddResult.0.Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.nodup_derivedLits._proof_1_4
... 305152 items, at THM groupCohomology.eq_d??_comp_inv
... 306176 items, at DEF Aesop.RuleTac.applyForwardRule
... 307200 items, at DEF Lean.Parser.Tactic.obtain
... 308224 items, at THM Std.DTreeMap.Internal.Impl.minKey_insert_le_minKey
... 309248 items, at THM EuclideanGeometry.angle_eq_arccos_of_angle_eq_pi_div_two
... 310272 items, at DEF Aesop.instToJsonForwardStateStats.toJson
... 311296 items, at THM _private.Mathlib.Geometry.Convex.ConvexSpace.Defs.0.Convexity.StdSimplex.convexCombPair_restrict_restrict_compl._simp_1_2
... 312320 items, at DEF Aesop.checkInvariantsIfEnabled
... 313344 items, at THM _private.Mathlib.MeasureTheory.Measure.Haar.Basic.0.MeasureTheory.Measure.haar.chaar_sup_eq._simp_1_5
... 314368 items, at THM Bundle.Trivialization.Prod.left_inv
... 315392 items, at THM Set.Ici.coe_inf
... 316416 items, at THM Std.Tactic.BVDecide.BVExpr.bitblast.blastShiftRightConst.go_get._proof_3
... 317440 items, at THM _private.Mathlib.AlgebraicGeometry.EllipticCurve.DivisionPolynomial.Degree.0.WeierstrassCurve.natDegree_coeff_?_ofNat
... 318464 items, at THM Ring.instDirectLimit._proof_28
... 319488 items, at THM _private.Init.Data.UInt.Lemmas.0.UInt8.toUSize_neg._simp_1_1
... 320512 items, at THM modelWithCornersEuclideanQuadrant._proof_5
... 321536 items, at THM Turing.TM1.stmts?.eq_2
... 322560 items, at THM Real.le_rpow_inv_iff_of_pos
... 323584 items, at THM Subgroup.centralizer.eq_1
... 324608 items, at THM ProbabilityTheory.Kernel.ext_fun_iff
... 325632 items, at DEF Lean.JsonRpc.ErrorCode._sizeOf_1
... 326656 items, at THM Int.gcd_neg
... 327680 items, at THM TensorProduct.instHopfAlgebra._proof_1
... 328704 items, at DEF ZFSet.vonNeumann
... 329728 items, at THM Pi.divInvOneMonoid.eq_1
... 330752 items, at DEF WithOne.map
... 331776 items, at THM _private.Mathlib.NumberTheory.Padics.Measure.AmiceTransform.0.AbstractMeasure.invTransform._proof_5
... 332800 items, at THM CategoryTheory.IsGrothendieckAbelian.mono_of_isColimit_monoOver
... 333824 items, at DEF Set.biUnionEqSigmaOfDisjoint
... 334848 items, at THM CFC.negPart_eq_zero_iff
... 335872 items, at DEF Aesop.CasesTarget'._sizeOf_1
... 336896 items, at THM PiTensorProduct.dualDistribEquivOfBasis._proof_1
... 337920 items, at DEF _private.Lean.Server.Rpc.RequestHandling.0.Lean.Server.handleRpcCall.match_8
... 338944 items, at THM _private.Mathlib.Data.Nat.Pairing.0.Nat.pair_lt_max_add_one_sq._proof_1_3
... 339968 items, at DEF _private.Lean.Meta.Sym.Pattern.0.Lean.Meta.Sym.mkPatternFromType.go.match_1
... 340992 items, at THM CategoryTheory.tensorRightHomEquiv_tensor
... 342016 items, at THM instBooleanAlgebraSubtypeProdAndEqHMulFstSndOfNatHAdd._proof_8
... 343040 items, at THM MulAut.characteristic._proof_25
... 344064 items, at THM SubMulAction.instInfSet._proof_2
... 345088 items, at THM Std.Internal.UV.Loop.Options.mk.injEq
... 346112 items, at THM QuotientAddGroup.rangeKerLift_injective
... 347136 items, at THM Language.isRegular_iff
... 348160 items, at THM AddChar.inv_apply
... 349184 items, at THM Std.ExtHashMap.mem_modify
... 350208 items, at DEF FirstOrder.Language.noBotOrderSentence
... 351232 items, at THM Field.Emb.Cardinal.equivLim._proof_9
... 352256 items, at DEF IsEmpty.toLocallyFiniteOrder
... 353280 items, at THM CategoryTheory.NatTrans.Coequifibered.comp
... 354304 items, at THM CartanMatrix.Realisation.reflectionPair_mem
... 355328 items, at THM CategoryTheory.isConnected_of_hasInitial
... 356352 items, at THM CategoryTheory.ObjectProperty.IsTriangulatedClosed?.of_isTriangulatedClosed?
... 357376 items, at THM Finsupp.linearEquivFunOnFinite.congr_simp
... 358400 items, at THM Std.Legacy.Range.forIn_eq_forIn_range'
... 359424 items, at THM Mem?p.norm
... 360448 items, at THM AddMonoid.Coprod.lift_swap
... 361472 items, at DEF Lean.Elab.RecKind.ctorElim
... 362496 items, at THM RBTree.RBNode.WF.modify
... 363520 items, at THM DistribMulActionHom.toAddMonoidHom_injective
... 364544 items, at THM CauchySeq.add_const
... 365568 items, at THM PosNum.decidablePrime._proof_1
... 366592 items, at DEF Lean.Elab.InlayHintTextEdit._sizeOf_1
... 367616 items, at THM Finset.sum_preimage_of_bij
... 368640 items, at THM CategoryTheory.Sieve.pushforward_apply
... 369664 items, at THM MeasureTheory.Measure.isMulInvariant_eq_smul_of_compactSpace
... 370688 items, at DEF SimpleGraph.IsTree.coloringTwo
... 371712 items, at THM AddEquiv.addSubmonoidCongr._proof_1
... 372736 items, at THM _private.Mathlib.Order.Hom.Order.0.OrderHom.instCompleteLattice._simp_2
... 373760 items, at THM nnnorm_ofAdd
... 374784 items, at DEF Cycle.instDecidableNontrivial
... 375808 items, at THM Multiset.prod_pair
... 376832 items, at THM Turing.TM1.stmts_supportsStmt
... 377856 items, at DEF WeierstrassCurve.Projective.neg
... 378880 items, at THM LinearMap.IsPerfPair.compl??
... 379904 items, at DEF Set.fintypeSub
... 380928 items, at THM TrivSqZeroExt.inl_sum
... 381952 items, at DEF Lean.Meta.instInhabitedSparseCasesOnInfo.default
slow (6237 ms): THM CategoryTheory.SubmonoidFunctor.instCompleteLattice._proof_15
... 382976 items, at THM Std.ExtTreeSet.le_max!_of_contains
... 384000 items, at THM CFC.ringInverse_conjSqrt
... 385024 items, at THM ENNReal.tendsto_coe_toNNReal
... 386048 items, at THM _private.Mathlib.RingTheory.Nilpotent.Basic.0.not_isNilpotent_neg_one._simp_1_1
slow (4106 ms): THM Polynomial.iterate_derivative_derivative_mul_X
... 387072 items, at THM CategoryTheory.Abelian.SpectralObject.opcyclesIsoKernel._proof_6
... 388096 items, at THM Equiv.Perm.cycleType_prime_order
... 389120 items, at THM Std.Antisymm.decide
... 390144 items, at DEF Lean.SubExpr.GoalsLocation.casesOn
... 391168 items, at DEF CategoryTheory.Limits.IsColimit.OfNatIso.colimitCocone
slow (9620 ms): THM PadicInt.coe_adicCompletionIntegersEquiv_apply
... 392192 items, at DEF EST.Out._sizeOf_1
... 393216 items, at DEF TopCat.Presheaf.SheafConditionPairwiseIntersections.coneEquivFunctor
... 394240 items, at DEF _private.Mathlib.Tactic.Abel.0.Mathlib.Tactic.Abel.instEvalExprAbelMode.evalExpr
... 395264 items, at DEF LinearMap.BilinForm.leftAdjointOfNondegenerate
... 396288 items, at DEF Associates.instGCDMonoid
... 397312 items, at DEF Lean.Meta.AbstractMVars.State.ctorIdx
... 398336 items, at DEF stdSimplex.barycenter
... 399360 items, at THM CategoryTheory.Over.mapComp_inv_app_left
... 400384 items, at THM CommHopfAlgCat.hasForgetToCommBialgCat._proof_1
... 401408 items, at THM Polynomial.map_mapRingHom_eval_map
... 402432 items, at THM isCompactOperator_iff_image_closedBall_subset_compact
... 403456 items, at THM MeasureTheory.AEStronglyMeasurable.add_iff_right
... 404480 items, at THM ChainComplex.alternatingConst._proof_3
... 405504 items, at THM Set.Pairwise.insert_of_notMem
... 406528 items, at THM WithBot.coe_iInf
... 407552 items, at DEF _private.Mathlib.Order.WellFoundedSet.0.Set.WellFoundedOn.acc_iff_wellFoundedOn.match_1_1
... 408576 items, at DEF instLinearOrderedAddCommMonoidWithTopOrderDualAdditive
... 409600 items, at THM CategoryTheory.Functor.pointwiseLeftKanExtension_desc_app
... 410624 items, at THM Vector.getElem?_push
... 411648 items, at DEF AlgebraicGeometry.Scheme.noConfusionType
... 412672 items, at THM SimpleGraph.egirth_le_two_mul_ediam_add_one
... 413696 items, at THM MeasureTheory.lintegral_sub_left_eq_self
... 414720 items, at THM _private.Mathlib.Analysis.Convex.BetweenList.0.List.exists_map_eq_of_sorted_nonempty_iff_wbtw._simp_1_4
... 415744 items, at DEF Lean.Meta.Grind.Arith.Linear.RingIneqCnstrProof.ctorElim
... 416768 items, at THM _private.Mathlib.AlgebraicTopology.SimplicialObject.DeltaZeroIter.0.CategoryTheory.SimplicialObject.?_??Iter._proof_5
... 417792 items, at THM NormedAddGroupHom.Equalizer.liftEquiv._proof_2
... 418816 items, at THM NonUnitalSubsemiring.mem_sumSq
... 419840 items, at THM RelEmbedding.sumLiftRelInr_apply
... 420864 items, at DEF Lean.Elab.Command.ModuleLinter.run
... 421888 items, at THM Std.DHashMap.Raw.contains_eq_isSome_get?
... 422912 items, at THM solvable_of_ker_le_range
... 423936 items, at DEF Aesop.IndexMatchResult.mk.noConfusion
... 424960 items, at THM _private.Init.Data.SInt.Bitwise.0.Int8.and_not_self._simp_1_1
... 425984 items, at THM BitVec.msb_setWidth'_of_lt._proof_2
... 427008 items, at THM List.minOn_eq_get_minOn?
... 428032 items, at THM strictMono_of_sub_one_lt
... 429056 items, at DEF _private.Lean.Elab.MutualInductive.0.Lean.Elab.Command.replaceIndFVarsWithConsts
... 430080 items, at THM SkewMonoidAlgebra.instAlgebraOfSMulCommClass._proof_2
... 431104 items, at THM Polynomial.scaleRoots_aeval_smul
... 432128 items, at THM Unitization.unitsFstOne_mulEquiv_quasiregular._proof_20
... 433152 items, at THM _private.Mathlib.LinearAlgebra.RootSystem.Base.0.RootPairing.Base.map_aux_pos
... 434176 items, at THM _private.Mathlib.NumberTheory.Niven.0.Real.isIntegral_two_mul_cos_rat_mul_pi._simp_1_1
... 435200 items, at DEF Mathlib.Tactic.Linarith.proveFalseByLinarith
... 436224 items, at THM _private.Mathlib.Analysis.Complex.Hadamard.0.Complex.HadamardThreeLines.mem_verticalClosedStrip_of_scale_id_mem_verticalClosedStrip._simp_1_3
... 437248 items, at THM _private.Mathlib.NumberTheory.NumberField.Ideal.KummerDedekind.0.NumberField.Ideal.primesOverSpanEquivMonicFactorsModAux._proof_3
... 438272 items, at DEF _private.Lean.Meta.HaveTelescope.0.Lean.Meta.SimpHaveResult.modified
... 439296 items, at THM AddSubgroup.forall_mem_zmultiples
... 440320 items, at THM SimpleGraph.Walk.edgeSet_nil
... 441344 items, at DEF Lean.Widget.ToModule.casesOn
... 442368 items, at THM _private.Mathlib.Algebra.Lie.Extension.0.LieAlgebra.Extension.twoCocycleAux._abel_2
... 443392 items, at THM TrivSqZeroExt.invertibleOfInvertibleFst._proof_1
... 444416 items, at THM Class.coe_inter
... 445440 items, at THM IsChain.pairwise_sUnion
... 446464 items, at DEF Aesop.ElabM.Context.forAdditionalGlobalRules
... 447488 items, at THM nhdsMulHom_apply
... 448512 items, at THM Std.IterM.take.eq_1
... 449536 items, at THM SkewMonoidAlgebra.liftNCAlgHom._proof_2
... 450560 items, at DEF AlgebraicGeometry.ValuativeCommSq.ctorIdx
... 451584 items, at THM Function.instIsEquivOnFun
... 452608 items, at DEF Lean.Elab.Tactic.Grind.liftGoalM
... 453632 items, at THM _private.Mathlib.Data.List.Pairwise.0.List.pairwise_iff_forall_infix._proof_1_80
slow (4292 ms): THM CategoryTheory.instIsIsoIndCoimageImageComparison
... 454656 items, at THM Matrix.diag_apply
... 455680 items, at DEF CategoryTheory.Limits.Bicone.IsBilimit._sizeOf_1
... 456704 items, at THM _private.Mathlib.Analysis.Complex.UpperHalfPlane.Basic.0.UpperHalfPlane.?_sq._simp_1_1
... 457728 items, at DEF CommRingCat.instHasForget?RingHomCarrierCommMonCatMonoidHomCarrier
... 458752 items, at THM Fin.dfoldl.eq_1
... 459776 items, at THM MeasureTheory.toFinite_apply_eq_zero_iff
... 460800 items, at DEF SeparationQuotient.instAddCommSemigroup
... 461824 items, at THM CompleteSublattice.mem_sSup
... 462848 items, at THM Polynomial.intCast_coeff_zero
... 463872 items, at THM _private.Mathlib.Combinatorics.SimpleGraph.CycleGraph.0.SimpleGraph.cycleGraph.cycleCons._proof_9
... 464896 items, at DEF Lean.Meta.Sym.Arith.CommSemiring._sizeOf_1
... 465920 items, at THM Filter.pi_pure
... 466944 items, at THM Std.ExtDTreeMap.Const.getD_eq_getD
... 467968 items, at THM _private.Mathlib.Data.Nat.Totient.0.Mathlib.Meta.Positivity.evalNatTotient._proof_2
... 468992 items, at THM _private.Mathlib.Combinatorics.SimpleGraph.Walk.Traversal.0.SimpleGraph.Walk.head_darts_eq_firstDart._proof_1_2
... 470016 items, at THM Std.DTreeMap.Const.getKey_insertManyIfNewUnit_list_of_mem
... 471040 items, at THM Std.DTreeMap.Raw.size_union_of_not_mem
... 472064 items, at THM NNRealRMK.integral_rieszMeasure
... 473088 items, at THM AlgebraicGeometry.IsAffineOpen.inf
... 474112 items, at THM List.Vector.notMem_zero
... 475136 items, at DEF CategoryTheory.LocalizerMorphism.RightResolution.casesOn
... 476160 items, at THM nhdsKer_empty
... 477184 items, at DEF Lean.Elab.Command.withWeakNamespace
... 478208 items, at THM CategoryTheory.ShortComplex.opcyclesIsoRightHomology_hom_inv_id
... 479232 items, at THM CategoryTheory.InjectiveResolution.ofCocomplex._proof_1
... 480256 items, at THM gc_map_onFun
... 481280 items, at THM _private.Mathlib.Dynamics.Flow.0.isInvariant_iff_image._simp_1_2
... 482304 items, at THM Vector.toList_insertIdx
... 483328 items, at THM IsMeagre.mono
... 484352 items, at THM _private.Mathlib.Topology.NhdsKer.0.nhdsKer_subset_nhdsKer_iff_nhdsSet._simp_1_1
... 485376 items, at DEF Locale.localePointOfSpacePoint
... 486400 items, at THM _private.Mathlib.CategoryTheory.Abelian.LeftDerived.0.CategoryTheory.ProjectiveResolution.leftDerivedToHomotopyCategory_app_eq._simp_1_1
... 487424 items, at DEF MeasureTheory.term?_,_
... 488448 items, at THM _private.Mathlib.Algebra.GroupWithZero.Pointwise.Finset.0.Finset.mul_zero_subset._simp_1_1
... 489472 items, at THM MvPolynomial.totalDegree_le_of_support_subset
... 490496 items, at THM Multiset.toList_singleton
... 491520 items, at THM Std.compare_ne_eq_iff_ne
... 492544 items, at DEF Order.PFilter.ctorIdx
... 493568 items, at THM Right.nsmul_neg
... 494592 items, at DEF CategoryTheory.AddMod.Hom.mk''
... 495616 items, at THM ContinuousMonoidHom.coe_comp
... 496640 items, at THM Topology.CWComplex.openCell_subset_closedCell
... 497664 items, at THM Representation.ofDistribMulAction_apply_apply
... 498688 items, at THM SSet.PtSimplex.RelStruct.copy._proof_3
... 499712 items, at THM CategoryTheory.tensorRightHomEquiv_symm_naturality
... 500736 items, at THM CategoryTheory.Functor.relativelyRepresentable.symmetryIso._proof_4
... 501760 items, at DEF Lean.PersistentArray.recOn
... 502784 items, at DEF Lean.MessageData.recOn
... 503808 items, at THM ContinuousLinearEquiv.hasSum'
... 504832 items, at THM inv_mul_le_iff?'
... 505856 items, at DEF instNonAssocCommSemiringWithConvMatrix
... 506880 items, at DEF LinearEquiv.sumArrowLequivProdArrow
... 507904 items, at THM CategoryTheory.Limits.LimitBicone.mk.injEq
... 508928 items, at THM LiouvilleNumber.partialSum_add_remainder
... 509952 items, at THM _private.Init.Data.Range.Polymorphic.IntLemmas.0.Int.induct_rco_left._proof_1_1
... 510976 items, at THM _private.Mathlib.SetTheory.Cardinal.Free.0.instCountableFreeGroup._proof_1
... 512000 items, at THM _private.Mathlib.Combinatorics.Additive.SubsetSum.0.Finset.vadd_finset_subsetSum_subset_subsetSum_insert._simp_1_1
... 513024 items, at THM CategoryTheory.Functor.Elements.groupoid._proof_1
... 514048 items, at THM FunLike.negZeroClass._proof_1
... 515072 items, at THM Vector.mem_insertIdx
... 516096 items, at THM finsuppTensorFinsupp'_symm_single_eq_tmul_single_one
... 517120 items, at DEF Module.Oriented.noConfusionType
... 518144 items, at DEF _private.Mathlib.Algebra.Group.Pointwise.Set.Basic.0.Set.univ_pow.match_1_1
... 519168 items, at THM _private.Mathlib.MeasureTheory.Group.Arithmetic.0.measurable_div_const'._simp_1_1
... 520192 items, at THM HasCompactSupport.convolution_integrand_bound_right_of_subset
... 521216 items, at THM List.head_scanr
... 522240 items, at THM ZetaAsymptotics.continuousOn_term_tsum
... 523264 items, at THM PairReduction.finset_logSizeBallSeq_add_one
... 524288 items, at THM SimpleGraph.ComponentCompl.hom.congr_simp
... 525312 items, at DEF Lean.Elab.Deriving.Header.noConfusionType
... 526336 items, at THM FirstOrder.Language.LHom.mem_substructureReduct._simp_1
... 527360 items, at DEF PFun.prodMap
... 528384 items, at THM Std.DTreeMap.Raw.Const.get!_inter_of_mem_right
... 529408 items, at THM List.cyclicPermutations_inj._simp_1
... 530432 items, at THM _private.Mathlib.MeasureTheory.Measure.Haar.NormedSpace.0.MonoidHom.exists_nhds_isBounded._simp_1_4
... 531456 items, at THM Polynomial.rootMultiplicity_mul'
... 532480 items, at THM Lean.Grind.instZeroInt64SintOfNatNat
... 533504 items, at THM AnalyticOnNhd.clog
... 534528 items, at DEF Bool.lt_wfRel.match_1
... 535552 items, at DEF Vector.leftpad
... 536576 items, at THM _private.Mathlib.AlgebraicTopology.SimplexCategory.GeneratorsRelations.Basic.0.SimplexCategoryGenRel.?_comp_?_nat._proof_1_1
... 537600 items, at THM CategoryTheory.Functor.asIsomorphism._proof_4
... 538624 items, at THM _private.Mathlib.Data.List.Cycle.0.Cycle.chain_iff_pairwise._simp_1_7
... 539648 items, at DEF ProofWidgets.Util.joinArrays
... 540672 items, at THM BoundedContinuousFunction.instModule'._proof_4
... 541696 items, at THM CategoryTheory.Functor.mapExtAddHom_apply
... 542720 items, at THM IntermediateField.normalClosure_map_eq
... 543744 items, at THM _private.Mathlib.Topology.LocallyClosed.0.coborder_eq_compl_frontier_iff._simp_1_3
... 544768 items, at THM Mathlib.Tactic.Peel.eventually_imp
... 545792 items, at THM _private.Mathlib.Topology.Compactification.StoneCech.0.Ultrafilter.tendsto_pure_self._simp_1_2
... 546816 items, at THM Fin.image_addNat_uIoo
... 547840 items, at THM Submodule.coe_mapAlgHom_apply
... 548864 items, at DEF QPF.Cofix.corec
... 549888 items, at DEF ContinuousLinearMapWOT.casesOn
... 550912 items, at THM gal_zero_isSolvable
... 551936 items, at THM CategoryTheory.Functor.monObjObj.eq_1
... 552960 items, at THM Lean.Meta.Grind.Arith.Cutsat.EqCnstrProof.core.injEq
... 553984 items, at DEF term_??_
... 555008 items, at DEF Lean.Meta.Match.MatchEqns.noConfusion
... 556032 items, at THM Turing.PartrecToTM2.?'.Supports.eq_6
... 557056 items, at DEF Lean.AxiomVal.mk.noConfusion
... 558080 items, at THM _private.Mathlib.NumberTheory.Harmonic.ZetaAsymp.0.riemannZeta_eventually_ne_zero_nhds_one._proof_1_1
... 559104 items, at THM smul_nonpos_iff_neg_imp_nonneg
... 560128 items, at THM RingHom.applyMulSemiringAction._proof_4
... 561152 items, at DEF CategoryTheory.GrothendieckTopology.OneHypercover._sizeOf_inst
... 562176 items, at THM _private.Mathlib.RingTheory.Polynomial.Content.0.Polynomial.content_X_mul._simp_1_2
... 563200 items, at THM Lean.Meta.Grind.Origin.fvar.injEq
... 564224 items, at THM _private.Mathlib.Combinatorics.SimpleGraph.Clique.0.SimpleGraph.isNClique_singleton._simp_1_2
... 565248 items, at DEF ZFSet.Definable.casesOn
... 566272 items, at DEF CategoryTheory.CopyDiscardCategory.noConfusion
... 567296 items, at THM NNRat.num_inv_of_ne_zero
... 568320 items, at THM _private.Mathlib.MeasureTheory.Measure.Portmanteau.0.MeasureTheory.limsup_measure_closed_le_of_forall_tendsto_measure._simp_1_5
... 569344 items, at THM Mathlib.Meta.NormNum.not_isSquare_of_isRat_neg
... 570368 items, at THM nhdsSet_sInter_le
... 571392 items, at DEF GradedMonoid.tacticApply_gmonoid_gnpowRec_succ_tac
... 572416 items, at THM AddSubgroup.map_inf_le
... 573440 items, at THM AffineSubspace.coe_ofEq_apply
... 574464 items, at THM FirstOrder.Language.Theory.Iff.realize_iff
... 575488 items, at DEF Cardinal.term?
... 576512 items, at THM CategoryTheory.Groupoid.invEquivalence_inverse_map
... 577536 items, at THM Matrix.Exists.eq_2
... 578560 items, at THM Finset.mul_nonempty
... 579584 items, at DEF instDistribMulActionUniformOnFun
... 580608 items, at THM Lean.Data.Trie.leaf.inj
... 581632 items, at THM FreeAbelianGroup.add_seq
... 582656 items, at THM ContinuousAffineMap.mk_coe
... 583680 items, at THM CategoryTheory.Subobject.ofLEMk.eq_1
... 584704 items, at DEF Lean.Lsp.instOrdDiagnosticSeverity
... 585728 items, at THM ContinuousMap.tensorHom_tmul
... 586752 items, at THM OpenPartialHomeomorph.IsImage.symm_apply_mem_iff
... 587776 items, at THM CategoryTheory.StructuredArrow.preEquivalenceInverse_obj_right_right
... 588800 items, at THM Std.ExtDTreeMap.get!_map
... 589824 items, at THM _private.Init.Data.String.Lemmas.Pattern.Find.Char.0.String.find?_char_eq_some_iff._simp_1_2
... 590848 items, at DEF Std.DTreeMap.Internal.RoiSliceData.ctorIdx
... 591872 items, at THM NonUnitalSubring.coe_comap
... 592896 items, at DEF _private.Lean.Server.FileWorker.InlayHints.0.Lean.Server.FileWorker.handleInlayHintsDidChange.updateOldInlayHints.match_3
... 593920 items, at THM _private.Mathlib.LinearAlgebra.Dimension.Torsion.Basic.0.rank_quotient_eq_of_le_torsion._simp_1_4
... 594944 items, at THM Order.Preimage.instAsymm
... 595968 items, at THM Submodule.linearProjOfIsCompl_comp_surjective_of_exact
... 596992 items, at THM UInt8.toUInt64_and
... 598016 items, at DEF Lean.ParserDescr.brecOn.go
... 599040 items, at THM CategoryTheory.Limits.fiberwiseColim_map_app
... 600064 items, at THM _private.Init.Data.List.Nat.Modify.0.List.drop_modify_of_lt._proof_1_2
... 601088 items, at THM StarAlgEquiv.ofBijective_apply
... 602112 items, at THM _private.Mathlib.Algebra.LinearRecurrence.0.LinearRecurrence.charPoly_degree_eq_order._simp_1_2
... 603136 items, at DEF Aesop.Script.StaticStructureM.Context._sizeOf_1
... 604160 items, at THM CategoryTheory.Bicategory.associator_hom_congr._proof_4
... 605184 items, at DEF Lean.Elab.Tactic.Omega.Problem.addEquality
... 606208 items, at THM RingCat.Colimits.quot_neg
... 607232 items, at DEF Lean.Meta.CoeFnType.noConfusion
... 608256 items, at THM String.Slice.SplitInclusiveIterator.instIteratorId.eq_1
... 609280 items, at THM DomMulAct.instT25Space
... 610304 items, at DEF CategoryTheory.ExponentiableMorphism.mk.noConfusion
... 611328 items, at DEF Lean.Meta.Grind.Arith.Cutsat.State.ctorIdx
... 612352 items, at THM Array.foldl_flip_append_eq_append
... 613376 items, at DEF instHashableSubtype
... 614400 items, at THM Nat.clog.go.eq_1
... 615424 items, at THM isCountablyCompact_singleton
... 616448 items, at DEF Lean.Meta.Sym.ProofInstArgInfo.isProof
... 617472 items, at THM Std.TreeMap.forM_eq_forM_toArray
... 618496 items, at DEF Mathlib.Tactic.Widget.StringDiagram.Node.recOn
... 619520 items, at THM List.exists_lt_of_prod_lt
... 620544 items, at THM bbdBelow_range_left_of_inf
... 621568 items, at THM MulRingNorm.mk.sizeOf_spec
... 622592 items, at THM Group.Generators.map_val
... 623616 items, at THM DFinsupp.support_smul
... 624640 items, at THM SkewPolynomial.C_eq_intCast
... 625664 items, at THM Std.Tactic.BVDecide.Normalize.BitVec.ite_same_then'
... 626688 items, at THM AdjoinRoot.powerBasisAux.congr_simp
... 627712 items, at THM CategoryTheory.Grothendieck.mapIdIso._proof_1
... 628736 items, at DEF AddMonoid.IsTorsion.torsionAddEquiv
... 629760 items, at THM Nat.Internal.Linear.instBEqPolyCnstr.beq.eq_2
... 630784 items, at THM CategoryTheory.Limits.pushout.instIsIsoCodiagonalOfEpi
... 631808 items, at THM StrictMono.maximal_preimage_top
... 632832 items, at THM isLocalMax_of_mono_anti'
... 633856 items, at THM RingCon.instDistribMulActionQuotientOfIsScalarTower._proof_1
... 634880 items, at THM CategoryTheory.Limits.CategoricalPullback.mkNatIso_eq
... 635904 items, at THM SimpleGraph.isContained_congr_right
... 636928 items, at THM IsCoprime.sub_mul_left_left_iff
... 637952 items, at DEF DivInvOneMonoid.recOn
... 638976 items, at DEF Lean.Lsp.MarkupKind.noConfusion
... 640000 items, at THM NNReal.measurable_of_tendsto
... 641024 items, at THM hasGradientAt_const
... 642048 items, at THM CategoryTheory.Limits.Bicone.category_comp_hom
... 643072 items, at THM _private.Init.Data.Order.MinMaxOn.0.left_le_apply_maxOn._simp_1_1
... 644096 items, at THM SemiNormedGrp?.mkHom_hom
... 645120 items, at THM MvQPF.quotientQPF._proof_1
... 646144 items, at THM HomologicalComplex.extendSingleIso_inv_f_assoc
... 647168 items, at THM CategoryTheory.GrothendieckTopology.MayerVietorisSquare.shortComplex_X?
... 648192 items, at THM Cardinal.aleph_limit
... 649216 items, at THM unique_iff_existsUnique
... 650240 items, at THM map_finset_prod
... 651264 items, at THM ProbabilityTheory.CondIndepSets.union
... 652288 items, at DEF Sigma.Lex.partialOrder
... 653312 items, at THM Matrix.ker_toLin_eq_bot
... 654336 items, at THM CategoryTheory.Presheaf.coherentExtensiveEquivalence_functor_map_hom
... 655360 items, at THM Std.Sat.AIG.BinaryInput.mk.inj
... 656384 items, at THM StarMonoidHom.mk.inj
... 657408 items, at THM List.set_eq_setTR
... 658432 items, at THM List.lex.eq_1
... 659456 items, at THM _private.Mathlib.Data.List.TakeDrop.0.List.tail_take_eq_take_tail._proof_1_3
... 660480 items, at THM Lex.instAddCommGroupWithOne._proof_4
... 661504 items, at THM _private.Mathlib.Computability.AkraBazzi.SumTransform.0.AkraBazziRecurrence.one_add_smoothingFn_le_two._simp_1_2
... 662528 items, at THM String.Slice.Pos.ofEqAppend.congr_simp
... 663552 items, at DEF Matroid.term_<r_
... 664576 items, at THM _private.Mathlib.GroupTheory.SpecificGroups.Cyclic.0.not_isCyclic_iff_exponent_eq_prime._proof_1_2
... 665600 items, at THM _private.Mathlib.Analysis.CStarAlgebra.PositiveLinearFunctional.0.ContinuousLinearMap.im_apply_eq_zero_of_tendsto_nhds_opNorm._simp_1_1
... 666624 items, at THM NFA.Path.cons.inj
... 667648 items, at THM ISize.not_neg_one
... 668672 items, at THM CategoryTheory.Functor.IsRepresentedBy.uliftYonedaIso_hom
... 669696 items, at THM ByteArray.append_eq_fastAppend
... 670720 items, at THM rotation_trans
... 671744 items, at THM CategoryTheory.Limits.pullbackIsoUnopPushout_hom_inr_assoc
... 672768 items, at THM _private.Batteries.Data.List.Interleave.0.List.interleave_flatten_flatten_of_length_eq_length._proof_1
... 673792 items, at DEF Lean.Elab.Tactic.Grind.LiftActionCoreResult.subgoals.elim
... 674816 items, at THM NonUnitalAlgebra.toNonUnitalSubsemiring_eq_top._simp_1
... 675840 items, at DEF DirectSum.GCommSemiring.ctorIdx
... 676864 items, at DEF CategoryTheory.Limits.ReflectsColimitsOfSize.recOn
... 677888 items, at DEF _private.Mathlib.Combinatorics.SimpleGraph.Coloring.Constructions.0.SimpleGraph.cycleGraph.tricoloring.match_3
... 678912 items, at DEF Lean.Parser.Tactic.specialize
... 679936 items, at THM ConvexCone.IsGenerating.isReproducing
... 680960 items, at THM CategoryTheory.IsCardinalFiltered.congr_simp
... 681984 items, at THM Function.const_add
... 683008 items, at THM CategoryTheory.isomorphismClasses._proof_5
... 684032 items, at THM CategoryTheory.Functor.RepresentableBy.mk.congr_simp
... 685056 items, at DEF Std.DTreeMap.Internal.Const.RooSliceData._sizeOf_inst
... 686080 items, at THM EStateM.run_throw
... 687104 items, at THM CategoryTheory.Subgroupoid.map_mono
... 688128 items, at THM Order.Ideal.PrimePair.I_union_F
... 689152 items, at THM CategoryTheory.Abelian.SpectralObject.SpectralSequenceDataCore.instHasFirstPageComputationEIntProdNatCoreE?CohomologicalNat
... 690176 items, at THM Std.HashMap.getElem_insert
... 691200 items, at THM Std.Do.Spec.forIn_slice
... 692224 items, at THM Module.Basis.sumQuot_repr_inr_of_mem
... 693248 items, at DEF _private.Batteries.Tactic.PrintPrefix.0.Batteries.Tactic.elabPrintPrefixConfig.evalConfigItem
... 694272 items, at THM Std.Do.Spec.IterM.foldM_filterMapWithPostcondition
... 695296 items, at THM LinearMap.toMatrixOrthonormal_apply_apply
... 696320 items, at THM ENat.coe_lift
... 697344 items, at DEF prioHigh
... 698368 items, at THM Fin.coe_cast
... 699392 items, at THM AlgebraicGeometry.Scheme.openCoverBasicOpenTop_f
... 700416 items, at THM _private.Init.Data.Iterators.Lemmas.Combinators.Append.0.Std.Iter.atIdxSlow?_append_of_productive._proof_1_1
... 701440 items, at THM CategoryTheory.ComposableArrows.Precomp.map_zero_one._proof_1

Test "navier-stokes-euler"

Expected: 👍 accept · Size: 1.5 GB · Lines: 28.6 M · lean4export: 3.1.0 · Lean: 4.34.0-rc2 · 📄 Declaration · 🔗 Source

OpenAI's Lean formalization of finite-time blowup for the three-dimensional incompressible Navier–Stokes equations with smooth forcing (on Euclidean space and on the periodic torus), and of unforced Euler blowup. See https://github.com/openai/NavierStokesAndEuler/.

This test exports the main results listed in the project's formalization.yaml, together with their dependencies.

Test result: ✋ rejected · exit code 1 · wall time: 3.0 m · instructions: 952.5 G · max rss memory: 5.6 GB

stdout:
REJECTED inductive NavierStokes.MixedAxisPreservation.CopyPotential: universe level of type_of(arg #3) of 'NavierStokes.MixedAxisPreservation.CopyPotential.mk' is too big for the corresponding inductive datatype
lean 4.34.0-rc2, export format 3.1.0, 28569038 lines
checked 90706 constants ({AXIOM=3, DEF=17958, THM=68482, OPAQUE=47, QUOT=4}) and 1361 inductive blocks in 180.78s
axioms declared: propext, Quot.sound, Classical.choice
1 declaration(s) rejected
stderr:
... 1024 items, at THM DivInvOneMonoid.inv_one
... 2048 items, at THM CauSeq.instNeg._proof_1
... 3072 items, at THM Int.neg_le_neg
... 4096 items, at THM inf_comm
... 5120 items, at DEF _private.Mathlib.Algebra.Order.CauSeq.Basic.0.CauSeq.mul_limZero_left.match_1_1
... 6144 items, at THM beq_false_of_ne
... 7168 items, at THM Set.eq_univ_iff_forall
... 8192 items, at DEF Lean.Grind.PreMatchCond
... 9216 items, at THM Int.leastOfBdd._proof_2
... 10240 items, at THM Nonneg.distribLattice._proof_1
... 11264 items, at THM Metric.isOpen_eball
... 12288 items, at DEF NonUnitalSeminormedRing.toSeminormedAddCommGroup
... 13312 items, at DEF SetRel.IsRefl
... 14336 items, at THM IsUniformAddGroup.ext
... 15360 items, at DEF _private.Mathlib.Data.Int.Cast.Lemmas.0.zsmul_eq_mul.match_1_1
... 16384 items, at THM Nat.choose_pos
... 17408 items, at THM one_zpow
... 18432 items, at THM Real.holderTriple_iff
... 19456 items, at THM TensorProduct.leftHasSMul._proof_1
... 20480 items, at THM LinearMap.pi_ext
... 21504 items, at DEF Subsemiring.instTop
... 22528 items, at THM _private.Mathlib.Algebra.Module.Submodule.Map.0.Submodule.gciMapComap._simp_1
... 23552 items, at THM linearIndepOn_iff?
... 24576 items, at THM Cardinal.mk_Iio_lt
... 25600 items, at THM LinearIndepOn.id_image?
... 26624 items, at THM AddMonoid.End.instSemiring._proof_2
... 27648 items, at THM Encodable.encodek
... 28672 items, at THM TopologicalSpace.Opens.gi._proof_3
... 29696 items, at THM Filter.EventuallyEq.comp?
... 30720 items, at THM IsProperMap.ultrafilter_le_nhds_of_tendsto
... 31744 items, at THM MeasureTheory.Lp.enorm_def
... 32768 items, at THM ContinuousMapClass.map_continuous
... 33792 items, at THM _private.Mathlib.Analysis.Analytic.Composition.0.FormalMultilinearSeries.applyComposition_update._simp_1_1
... 34816 items, at THM le_nhds_iff_adhp_of_cauchy
... 35840 items, at THM HasFDerivWithinAt.continuousWithinAt
... 36864 items, at DEF _private.Mathlib.Topology.Algebra.Monoid.0.tendsto_list_prod.match_1_1
... 37888 items, at THM Fintype.card_eq_one_of_forall_eq
... 38912 items, at DEF MeasureTheory.OuterMeasure.sum
... 39936 items, at THM MeasureTheory.MeasurePreserving.map_eq
... 40960 items, at THM _private.Mathlib.LinearAlgebra.LinearPMap.0.LinearPMap.sup_aux._simp_1_4
... 41984 items, at THM _private.Mathlib.MeasureTheory.Integral.Bochner.VitaliCaratheodory.0.MeasureTheory.exists_upperSemicontinuous_le_lintegral_le._simp_1_2
... 43008 items, at THM NavierStokes.AxisWeightEstimates.squareDecay_succ_le
... 44032 items, at THM NavierStokes.ReferencePath.Input.refF_eq_logtime
... 45056 items, at THM MeasureTheory.isAddLeftInvariant_smul_nnreal
... 46080 items, at THM Module.Free.function
... 47104 items, at THM LinearEquiv.finTwoArrow._proof_2
... 48128 items, at THM _private.Mathlib.Analysis.BoxIntegral.Basic.0.BoxIntegral.HasIntegral.of_bRiemann_eq_false_of_forall_isLittleO._simp_1_3
... 49152 items, at THM NormedSpace.sphere_nonempty._simp_1
... 50176 items, at THM ENNReal.Finiteness.inv_ne_top
... 51200 items, at THM NavierStokes.EndpointExtension.glue_eq_left
... 52224 items, at THM Besicovitch.exists_disjoint_closedBall_covering_ae_of_finiteMeasure_aux
... 53248 items, at THM _private.Mathlib.Data.Set.UnionLift.0.Set.preimage_iUnionLift._simp_1_3
... 54272 items, at DEF _private.Mathlib.Data.Nat.Choose.Basic.0.Nat.choose_succ_self_right.match_1_1
... 55296 items, at DEF NavierStokes.RadialModulation.BaseProfile
... 56320 items, at THM NavierStokes.PulseLag.massMoment_pulse
... 57344 items, at DEF NavierStokes.ExtendedHeatedOutgoing.amplitudeBound
... 58368 items, at THM Matrix.sub_cons
... 59392 items, at THM NavierStokes.ReferenceBounds.p1_lower_from_source
... 60416 items, at THM NavierStokes.NominalConeAssembly.Witness.log_histories
... 61440 items, at DEF NavierStokes.ModulatedProfileAssembly.ParameterData.target
... 62464 items, at THM lebesgue_number_of_compact_open
... 63488 items, at DEF NavierStokes.SlowResidualMatching.zDensity
... 64512 items, at DEF Matrix.involutiveNeg
... 65536 items, at THM Function.Semiconj?.iterate
... 66560 items, at THM NavierStokes.SolenoidalDiagonal.potentialSum_eventuallyEq_partial._simp_1_1
... 67584 items, at THM Lean.Grind.CommRing.lt_mul
... 68608 items, at THM NavierStokes.TemporalMeanUpdate.coverLinear._proof_4
... 69632 items, at DEF NavierStokes.StateReindex.blockCoefficients
... 70656 items, at THM NavierStokes.CommonCoverSolve.Geometry.coordinates.eq_1
... 71680 items, at THM NavierStokes.HarmonicSourceSupport.nativeUnion_closed
... 72704 items, at THM NavierStokes.ActualSignedGeometry.slot_coordinates_radial
... 73728 items, at THM Function.Injective.hasSum_range_iff
... 74752 items, at THM OrthogonalFamily.range_linearIsometry
... 75776 items, at THM NavierStokes.CorrectionInitialization.ActualPrimary.rankInner_pos
... 76800 items, at THM NavierStokes.PrimaryFieldAssembly.SourcePair.pairData._proof_1
... 77824 items, at DEF NavierStokes.PhysicalResidualTZ.graphAxialTZ
... 78848 items, at THM Prod.instNonAssocSemiring._proof_4
... 79872 items, at THM NavierStokes.ActualSignedStageControls.phaseCell._proof_1
... 80896 items, at THM NavierStokes.CopySolveCompatibility.coordinates_timeGeometry_fst
... 81920 items, at THM NavierStokes.ActualParticularGaussian.transportedLength_lower
... 82944 items, at DEF NavierStokes.BaseExterior.closedCartesianHeatDomain
... 83968 items, at THM NavierStokes.InitialPhysicalData.copyPressure_zero_germ
... 84992 items, at THM NavierStokes.PhysicalResidualJetBounds.NativeBounds.pi
... 86016 items, at DEF NavierStokes.ActualCurrentCarrierJets.Native
... 87040 items, at THM NavierStokes.ActualPrimaryCoherence.physicalAmplitude_eq

Test "other/extra-rec"

Expected: ✋ reject · Size: 1.4 KB · Lines: 21 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False from an extra recursor that no inductive declaration could produce.

The export contains False exactly as the prelude has it — an empty Prop-valued inductive with no constructors — together with its ordinary False.rec. Smuggled into the same inductive group is a second recursor, named rogue, whose type is False itself and which has no motives, no minor premises and no rules. The theorem inconsistent : False is then simply rogue.

A checker must derive the recursors of an inductive group from the inductive declaration and reject any exported recursor that is not one of them; here that fails on the name (rogue is not False.rec) as well as on the type. A checker that instead registers exported recursors as given ends up with an inhabitant of the genuine empty type.

This is a different gap from bugs/nat-rec-rules, which perturbs the rules of a legitimate recursor: here an entire recursor constant is fabricated, so validating only the rules of the recursors one expects does not catch it.

Test result: ✋ rejected · exit code 1 · wall time: 95 ms · instructions: 602.4 M · max rss memory: 64.6 MB

stdout:
REJECTED inductive False: export has 2 recursors but 1 are expected
lean 4.29.1, export format 3.1.0, 21 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "other/level-index-out-of-order"

Expected: 👍 accept · Size: 328 B · Lines: 6 · lean4export: 0.1.0 · Lean: 4.29.1 · 📄 Declaration

Lean4export will create internalization-table references contiguously in order: in references for names, il references for levels, and ie references for expressions all work this way.

However, the spec merely requires that these are integers. It's reasonable for an implementation to assume these are approximately dense (and to treat them as array indices instead of hashtable entries), but a kernel should handle skipped indices or out-of-order indices.

This test checks that the kernel doesn't require internaliation-table references to be presented in ascending order. If the level referenes 2 and 1 were swapped, this would be the expected encoding of axiom foo : Sort 2. This encoding should be equivalent.

Test result: 👍 accepted · exit code 0 · wall time: 92 ms · instructions: 507.5 M · max rss memory: 64.1 MB

stdout:
lean 4.29.1, export format 3.1.0, 6 lines
checked 1 constants ({AXIOM=1}) and 0 inductive blocks in 0.02s
axioms declared: foo
all declarations verified

Test "other/nat-lit-add"

Expected: 👍 accept · Size: 26.0 KB · Lines: 478 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The kernel's Nat extension reduces Nat.add applied to two literals to a literal, instead of unfolding the numerals to Nat.succ chains. The arguments here are large enough that unfolding is not a practical alternative, so a checker that only implements natLitEq-style literal↔succ conversion will not get this for free.

Exported as natAddLit : Nat.add 123456789 987654321 = 1111111110 := rfl. The application is Nat.add on .lits (not HAdd/OfNat).

Test result: 👍 accepted · exit code 0 · wall time: 113 ms · instructions: 811.4 M · max rss memory: 65.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 478 lines
checked 27 constants ({DEF=10, THM=1}) and 5 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "other/nat-lit-add-bad"

Expected: ✋ reject · Size: 25.3 KB · Lines: 465 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The claimed result of Nat.add on two literals does not match the kernel's literal arithmetic:

natAddLitBad : Nat.add 123456789 987654321 = 1111111111
  := Eq.refl (Nat.add 123456789 987654321)

The value is well-typed as @Eq Nat (Nat.add …) (Nat.add …) and is injected with debug.skipKernelTC. A sound checker must reject the declaration type mismatch against the claimed = 1111111111.

Test result: ✋ rejected · exit code 1 · wall time: 116 ms · instructions: 858.3 M · max rss memory: 66.1 MB

stdout:
REJECTED THM natAddLitBad: declaration type mismatch, natAddLitBad
  value has type: (Eq.{[1]} Nat (Nat.add (OfNat.ofNat.{[0]} Nat 123456789 (instOfNatNat 123456789)) (OfNat.ofNat.{[0]} Nat 987654321 (instOfNatNat 987654321))) (Nat.add (OfNat.ofNat.{[0]} Nat 123456789 (instOfNatNat 123456789)) (OfNat.ofNat.{[0]} Nat 987654321 (instOfNatNat 987654321))))
  but is expected to have type: (Eq.{[1]} Nat (Nat.add (OfNat.ofNat.{[0]} Nat 123456789 (instOfNatNat 123456789)) (OfNat.ofNat.{[0]} Nat 987654321 (instOfNatNat 987654321))) (OfNat.ofNat.{[0]} Nat 1111111111 (instOfNatNat 1111111111)))
lean 4.34.1, export format 3.1.0, 465 lines
checked 25 constants ({DEF=9}) and 5 inductive blocks in 0.05s
axioms declared: none
1 declaration(s) rejected

Test "other/nat-lit-ble"

Expected: 👍 accept · Size: 28.8 KB · Lines: 520 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Nat.ble on two literals reduces to a Bool constructor: Nat.ble 1000000 1000001 = true. Same Nat-literal extension as nat-lit-add; the result is Bool rather than Nat.

Test result: 👍 accepted · exit code 0 · wall time: 111 ms · instructions: 814.6 M · max rss memory: 66.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 520 lines
checked 31 constants ({DEF=10, THM=1}) and 6 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "other/nat-lit-sub"

Expected: 👍 accept · Size: 30.0 KB · Lines: 561 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Nat.sub on two literals truncates at zero: Nat.sub 1000000 1000001 = 0. Same Nat-literal extension as nat-lit-add; the numerals are large enough that unfolding Nat.sub to a Nat.succ recursor is not a practical path.

Test result: 👍 accepted · exit code 0 · wall time: 139 ms · instructions: 847.0 M · max rss memory: 67.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 561 lines
checked 31 constants ({DEF=14, THM=1}) and 5 inductive blocks in 0.05s
axioms declared: none
all declarations verified

Test "other/orphan-ctor"

Expected: ✋ reject · Size: 1.4 KB · Lines: 22 · lean4export: 3.1.0 · Lean: 4.29.1 · 📄 Declaration

Proof of False from a constructor of an inductive type that does not exist.

The export contains False exactly as the prelude has it — an empty Prop-valued inductive with no constructors, its ctors field is the empty list — together with its ordinary False.rec. Smuggled into the same inductive block is a constructor named rogue, of type False, with no parameters and no fields, whose induct field names Orphan, a name for which the export has no declaration at all. The theorem inconsistent : False is then simply rogue.

A checker must derive the constructors of an inductive group from the inductive declarations and reject any exported constructor that is not one of them; here that fails because False has no constructors, and the inductive type rogue claims to come from does not exist. A checker that instead registers exported constructors as given — or that only checks constructors whose induct field points at a declaration it knows — ends up with an inhabitant of the genuine empty type.

This is the constructor-side counterpart of bugs/orphan-rec: in both cases the bogus declaration escapes by not being attached to any inductive declaration that the checker verifies, rather than by disagreeing with one.

Test result: ✋ rejected · exit code 1 · wall time: 97 ms · instructions: 569.9 M · max rss memory: 64.5 MB

stdout:
REJECTED inductive False: export contains constructors that no inductive type lists
lean 4.29.1, export format 3.1.0, 22 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "other/proj-of-prop"

Expected: ✋ reject · Size: 3.9 KB · Lines: 56 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A proof of False via a projection from a Prop-typed structure whose constructor was applied to an ill-typed argument. The exported term is

badFalse : False := (Wrapper.mk True.intro).p

where Wrapper : Prop has a single field p : False, so Wrapper.mk expects a proof of False but is given True.intro : True.

A sound checker must reject this. A checker that types a projection by inferring (rather than checking) its structure argument — i.e. that trusts the structure to be well-typed instead of verifying the constructor's argument types against its binders — will accept it, because Wrapper.mk True.intro still formally inhabits Wrapper at the structural level, and the p projection is then read back out at the declared field type False.

Test result: ✋ rejected · exit code 1 · wall time: 97 ms · instructions: 636.5 M · max rss memory: 64.6 MB

stdout:
REJECTED THM badFalse: application type mismatch
  function head: Wrapper.mk
  argument: True.intro
  has type: True
  but is expected to have type: False
lean 4.34.1, export format 3.1.0, 56 lines
checked 8 constants ({}) and 3 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "other/sparse-name-index"

Expected: 👍 accept · Size: 292 B · Lines: 4 · lean4export: 0.1.0 · Lean: 4.29.1 · 📄 Declaration

Lean4export will create internalization-table references contiguously in order: in references for names, il references for levels, and ie references for expressions all work this way.

However, the spec merely requires that these are integers. It's reasonable for an implementation to assume these are approximately dense (and to treat them as array indices instead of hashtable entries), but a kernel should handle skipped indices or out-of-order indices.

This test checks that a kernel doesn't require internalization-table references to be assigned sequentially starting from 1. If the "2" and "4" were replaced by "1" and "0", respectively, this would be the expected encoding of axiom foo : Prop. This encoding should be equivalent.

Test result: 👍 accepted · exit code 0 · wall time: 85 ms · instructions: 544.1 M · max rss memory: 64.1 MB

stdout:
lean 4.29.1, export format 3.1.0, 4 lines
checked 1 constants ({AXIOM=1}) and 0 inductive blocks in 0.02s
axioms declared: foo
all declarations verified

Test "perf/app-lam"

Expected: 👍 accept · Size: 1.2 MB · Lines: 28.6 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A synthetically generated term with n levels of alternating applications and lambdas, with DAG sharing.

At each level, a constant is applied to two identical lambda arguments. The export format records these as a single shared expression (DAG). Each lambda body grows with the nesting depth, referencing all enclosing binders.

This tests two aspects of checker performance:

Infer cache: Since both arguments at each level are the same expression, a checker without an infer cache re-infers the type of each shared subterm, doubling work at every level — O(2ⁿ) total.

Substitution cost: Even with a cache, type-inferring each lambda requires substituting into its body (size O(n)) at each of the n levels, giving O(n²) total. Whether this cost arises depends on the checker's binder representation.

Test result: 👍 accepted · exit code 0 · wall time: 11.7 s · instructions: 69.5 G · max rss memory: 2.8 GB

stdout:
lean 4.34.1, export format 3.1.0, 28578 lines
checked 35 constants ({DEF=16}) and 6 inductive blocks in 11.40s
axioms declared: none
all declarations verified
stderr:
slow (11258 ms): DEF dag_app_binder

Test "perf/args-before-unfold"

Expected: 👍 accept · Size: 44.5 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

count #n      and      count (N.add #(n-1) #1)

where #k is the numeral with k successors, and count #k evaluates to #k in Θ(k²) reductions.

N.add #(n-1) #1 reduces to #n in n steps, so the two arguments agree for Θ(n), and the applications agree with them without count ever being unfolded. Evaluating both applications costs Θ(n²). The test asks whether a checker tries the arguments of a shared head constant before unfolding it.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Test result: 👍 accepted · exit code 0 · wall time: 154 ms · instructions: 1.6 G · max rss memory: 73.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 1158 lines
checked 10 constants ({DEF=2, THM=1}) and 2 inductive blocks in 0.08s
axioms declared: none
all declarations verified

Test "perf/beta-ladder"

Expected: 👍 accept · Size: 450.6 KB · Lines: 10.4 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check reduces

(fun x₁ => … (fun xₙ => x₁ + (x₂ + (… + (xₙ + 0)))) 0 …) 0

to 0, through n beta redexes over a body that reads every binder.

Reducing the ladder takes n beta steps whatever a checker does, so the test is what one step costs. Substituting into the body on entry to binder k copies the n − k redexes still below it, and those copies sum to Θ(n²). Carrying the substitution in an environment leaves the body untouched, for Θ(n).

N=2000 in the Lean source.

Test result: 👍 accepted · exit code 0 · wall time: 1.4 s · instructions: 13.5 G · max rss memory: 603.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 10382 lines
checked 21 constants ({DEF=7, THM=1}) and 4 inductive blocks in 1.23s
axioms declared: none
all declarations verified

Test "perf/church-numerals"

Expected: 👍 accept · Size: 9.6 KB · Lines: 227 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

cmul (cnum n) (cnum (n+1))      and      cmul (cnum (n+1)) (cnum n)

where cnum k is the Church numeral fun X s z => s (s (... z)) and cmul a b iterates b as many times as a counts.

Both sides have the normal form with n(n+1) applications of the bound s. Unfolding cmul on the left leaves cnum n X (cnum (n+1) X s), where each of the n occurrences of the bound function copies the redex cnum (n+1) X s, so the normal form takes n(n+1) beta steps and shares nothing. No other delta step is available, so the Θ(n²) measured is beta reduction under binders and little else.

N=120 in the Lean source, giving a reduction depth of 14520. From the conv_eval benchmark of András Kovács' smalltt.

Test result: 👍 accepted · exit code 0 · wall time: 158 ms · instructions: 2.0 G · max rss memory: 101.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 227 lines
checked 6 constants ({DEF=2, THM=1}) and 1 inductive blocks in 0.08s
axioms declared: none
all declarations verified

Test "perf/discarded-argument"

Expected: 👍 accept · Size: 15.9 KB · Lines: 367 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

dropArg (count #n)      and      dropArg (count #(n+1))

where count #k evaluates to the numeral #k in Θ(k²) reductions, and dropArg maps every numeral to N.O.

Unfolding dropArg leaves N.O against N.O, for Θ(1). Comparing the arguments first evaluates two numerals of different value, for Θ(n²), and then throws that answer away. The test asks whether a checker unfolds a constant before looking at an argument the constant never uses.

N=200 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Test result: 👍 accepted · exit code 0 · wall time: 192 ms · instructions: 2.7 G · max rss memory: 102.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 367 lines
checked 11 constants ({DEF=3, THM=1}) and 2 inductive blocks in 0.11s
axioms declared: none
all declarations verified

Test "perf/discarded-argument-match"

Expected: 👍 accept · Size: 29.2 KB · Lines: 606 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

discarded-argument.lean with count and N.add written by structural recursion, so the declaration to check is the same

dropArg (count #n)      and      dropArg (count #(n+1))

over definitions that unfold through brecOn rather than through N.rec.

brecOn reduces via the course-of-values table N.below #k = m #(k-1) ×' (m #(k-2) ×' (… ×' PUnit)), a k-deep tuple holding the result at every predecessor. The compiled count reads only x.1, so the rest of the table is built and never read, and typing each projection forces N.below to the depth of that projection.

N=200 in the Lean source, matching its pair.

Test result: 👍 accepted · exit code 0 · wall time: 241 ms · instructions: 4.4 G · max rss memory: 144.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 606 lines
checked 26 constants ({DEF=12, THM=1}) and 4 inductive blocks in 0.16s
axioms declared: none
all declarations verified

Test "perf/folded-constant-first"

Expected: 👍 accept · Size: 52.0 KB · Lines: 1.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

tagged (count #n)      and      (false, count #n)

where tagged m = (isZero m, m), so unfolding the left side leaves the same application count #n in both components, forced by isZero in one and plain in the other.

The plain occurrences are identical, for Θ(1); the forced one evaluates count #n once. The order matters for a checker that leaves a constant unfolded once it reduces it: reducing the forced component first replaces count #n by its value on one side, and the plain comparison then faces a folded application against an evaluated one. Here the forcing component comes first; folded-constant-last.lean swaps them, and the ratio between the two files is what that costs.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §10, where the two orders cost Rocq 3 × 10⁻⁵ s and 0.078 s.

Test result: 👍 accepted · exit code 0 · wall time: 151 ms · instructions: 1.6 G · max rss memory: 76.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 1262 lines
checked 19 constants ({DEF=4, THM=1}) and 4 inductive blocks in 0.08s
axioms declared: none
all declarations verified

Test "perf/folded-constant-last"

Expected: 👍 accept · Size: 51.0 KB · Lines: 1.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

tagged (count #n)      and      (count #n, false)

where tagged m = (m, isZero m): folded-constant-first.lean with the components swapped, so the plain occurrences of count #n are compared before anything forces the application.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Test result: 👍 accepted · exit code 0 · wall time: 142 ms · instructions: 1.6 G · max rss memory: 76.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 1262 lines
checked 19 constants ({DEF=4, THM=1}) and 4 inductive blocks in 0.07s
axioms declared: none
all declarations verified

Test "perf/fueled-chain"

Expected: 👍 accept · Size: 848.6 KB · Lines: 17.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Distilled from con-leche's fuel-bridge (_datF) lemmas, the declarations on which nanobruijn times out on the con-leche test.

Fueled α packages a fuel-indexed family p : Nat → Except Unit α with a proof whose type mentions p twice under binders. A _datF lemma states that running a monadic function in Fueled and extracting at fuel F equals running it in Except Unit, proved by unfolding and rewriting with the atF lemmas for bind/pure/throw/ite. What is left for the kernel is a definitional equality between two monadic programs that differ only in the monad instance, under one binder per bind and a do-notation join point per unless … throw guard.

chainN (N = 6, 9, 12) has N binds, each followed by a guard. A checker that recognises the unfolded and the literal program as equal outright is fast (nanoda: 2 ms, 18 ms, 32 ms); one that compares them structurally unfolds bind to Subtype.mk p h and, through proof irrelevance on the hs, re-compares the rest of the program twice per guard (nanobruijn: 19 ms, 4.1 s, 256 s). Without the guards it is cheap for both.

Test result: 👍 accepted · exit code 0 · wall time: 272 ms · instructions: 4.3 G · max rss memory: 133.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 17289 lines
checked 200 constants ({AXIOM=2, DEF=84, THM=27, QUOT=4}) and 26 inductive blocks in 0.17s
axioms declared: Quot.sound, propext
all declarations verified

Test "perf/grind-ring-5"

Expected: 👍 accept · Size: 9.8 MB · Lines: 200.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A grind tactic test from the Lean 4 test suite.

This produces a theorem with a rather large proof term that needs fast reduction.

Test result: 👍 accepted · exit code 0 · wall time: 1.8 s · instructions: 23.7 G · max rss memory: 503.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 200318 lines
checked 2520 constants ({AXIOM=3, DEF=969, THM=1190, OPAQUE=2, QUOT=4}) and 105 inductive blocks in 1.65s
axioms declared: Classical.choice, propext, Quot.sound
all declarations verified
stderr:
... 1024 items, at THM Nat.gcd.induction
... 2048 items, at THM Lean.Grind.CommRing.Poly.denote_addConst

Test "perf/identical-nesting"

Expected: 👍 accept · Size: 8.7 KB · Lines: 172 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

f4 (f4 (... (f4 N.O) ...))      and      f4 (f4 (... (f4 N.O) ...))

n applications of f4 on each side, the same term twice, where f0 is the identity on N and each of f1, f2, f3, f4 applies its predecessor twice, so the nesting expands into 16n applications of f0.

The test asks whether a checker compares the two sides before it starts unfolding, which answers in Θ(n). Unfolding one side at a time offers 16n applications to choose from per side, and the reachable pairs of partially unfolded sides grow exponentially in n.

N=30 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Test result: 👍 accepted · exit code 0 · wall time: 116 ms · instructions: 634.5 M · max rss memory: 64.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 172 lines
checked 13 constants ({DEF=5, THM=1}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "perf/irrelevance-before-evaluation"

Expected: 👍 accept · Size: 17.5 KB · Lines: 388 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check is

slowTriv (count #n) = True.intro

proved by Eq.refl, where slowTriv m : True recurses over m, so forcing it to a constructor evaluates the numeral in Θ(n²) reductions.

Checking compares the two proofs as arguments of Eq, whose head is rigid: nothing can be unfolded instead. Proof irrelevance settles the proofs by their type for Θ(1); evaluating the left one to a constructor costs Θ(n²) and yields the answer irrelevance already gave. The test asks whether a checker consults proof irrelevance before it reduces.

N=200 in the Lean source.

Test result: 👍 accepted · exit code 0 · wall time: 111 ms · instructions: 710.1 M · max rss memory: 65.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 388 lines
checked 14 constants ({DEF=3, THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "perf/let-fold"

Expected: 👍 accept · Size: 316.9 KB · Lines: 6.0 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check is

let d := bits #n 0; (rfl : d + 0 = Nat.add d 0)

where bits #n 0 is a closed Nat whose evaluation makes 2^n recursive calls, and the rfl is wrapped in id so that its type is compared with d + 0 = Nat.add d 0 inside the body of the let.

The two sides differ only in how the addition is written. Unfolding HAdd.hAdd turns the left side into the right, for Θ(1). But both sides are additions of literals to a closed term, so a checker that folds closed Nat arithmetic (Nat.add on literals via GMP) will try to evaluate d first, for Θ(2^n). The official kernel only folds terms without free variables, and it checks the body of a let with d as a free variable (bound to its value in the local context), so it never evaluates bits. A checker that substitutes the value for d before checking the body makes the comparison closed and pays for the evaluation.

Found by con-leche on openai/math (SquareDifference, OAI.SquareDifference.source_ordered_contraction), where the bound value is Fintype.card TupleVertex, whose evaluation enumerates permutations and takes the checker past 6 GB; the official kernel checks that declaration in 16 ms.

N=16 in the Lean source.

Test result: 👍 accepted · exit code 0 · wall time: 1.5 s · instructions: 13.1 G · max rss memory: 563.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 5991 lines
checked 206 constants ({DEF=100, THM=33}) and 23 inductive blocks in 1.40s
axioms declared: none
all declarations verified

Test "perf/let-ladder"

Expected: 👍 accept · Size: 457.6 KB · Lines: 10.4 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check has type Nat and value

let x₃ := 0; x₃ + (let x₂ := 0; x₂ + (let x₁ := 0; x₁ + (x₃ + (x₂ + (x₁ + 0)))))

shown at n=3: n let bindings, each separated from the next by an addition, over an innermost sum that names every binding.

Substituting a binding into the body before checking it traverses O(n) nodes at each of the n bindings, for Θ(n²) in time and in allocated nodes. Recording the binding and reading it where the body names it costs O(1) per binding, for Θ(n).

The additions are what keep the bindings apart: a run of adjacent lets could be opened by a single substitution; not so here. Nat.add is the only application head, so no beta reduction is involved.

N=2000 in the Lean source.

Test result: 👍 accepted · exit code 0 · wall time: 915 ms · instructions: 8.1 G · max rss memory: 447.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 10403 lines
checked 23 constants ({DEF=10}) and 4 inductive blocks in 0.79s
axioms declared: none
all declarations verified

Test "perf/magma-list-deep-n21"

Expected: 👍 accept · Size: 1.1 MB · Lines: 21.8 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Countermodel certificate for an equational-theories implication, closed by decide. A magma on Fin 21 with an inline List operation table satisfies x = (x ◇ x) ◇ (x ◇ (y ◇ y)) but not x = x ◇ (x ◇ x). The search space is only 21^2 tuples, but each equation nests the operation several deep, so every tuple expands into a chain of linear list lookups.

From a corpus of certificates generated for the SAIR math distillation challenge (equational theories track). The small end of the deep-nesting family; magma-list-deep-n36 is the same workload at a larger scale.

Test result: 👍 accepted · exit code 0 · wall time: 3.7 s · instructions: 28.6 G · max rss memory: 1.0 GB

stdout:
lean 4.34.1, export format 3.1.0, 21842 lines
checked 623 constants ({AXIOM=1, DEF=308, THM=153, OPAQUE=1}) and 51 inductive blocks in 3.52s
axioms declared: propext
all declarations verified
stderr:
slow (3349 ms): DEF countermodel

Test "perf/magma-list-deep-n36"

Expected: 👍 accept · Size: 1.2 MB · Lines: 23.0 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Countermodel certificate for an equational-theories implication, closed by decide. A magma on Fin 36 with an inline List operation table satisfies x = y ◇ (y ◇ (x ◇ (y ◇ x))) but not x = x ◇ (x ◇ x). The search space is only 36^2 tuples, but each side of the equation nests the operation five deep, so every tuple expands into a long chain of linear list lookups. The heaviest test of the magma family.

From a corpus of certificates generated for the SAIR math distillation challenge (equational theories track). magma-list-deep-n21 is the same workload at a smaller scale.

Test result: 👍 accepted · exit code 0 · wall time: 1.0 m · instructions: 346.8 G · max rss memory: 7.6 GB

stdout:
lean 4.34.1, export format 3.1.0, 23035 lines
checked 623 constants ({AXIOM=1, DEF=308, THM=153, OPAQUE=1}) and 51 inductive blocks in 60.94s
axioms declared: propext
all declarations verified
stderr:
slow (60740 ms): DEF countermodel

Test "perf/magma-list-pair-n21"

Expected: 👍 accept · Size: 583.1 KB · Lines: 11.0 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Countermodel certificate for an equational-theories implication, closed by decide. A magma on Fin 21 with an inline List operation table satisfies x ◇ y = z ◇ w but not x = x ◇ x. Checking the certificate evaluates the decidable instance over all 21^4 ≈ 195k four-tuples; every ◇ unfolds to a linear lookup into the list. The widest search space of the magma family.

From a corpus of certificates generated for the SAIR math distillation challenge (equational theories track). magma-list-pair-n7 is the same workload at a smaller scale.

Test result: 👍 accepted · exit code 0 · wall time: 15.2 s · instructions: 118.8 G · max rss memory: 4.8 GB

stdout:
lean 4.34.1, export format 3.1.0, 11021 lines
checked 337 constants ({AXIOM=1, DEF=157, THM=90}) and 28 inductive blocks in 14.79s
axioms declared: propext
all declarations verified
stderr:
slow (14644 ms): DEF countermodel

Test "perf/magma-list-pair-n7"

Expected: 👍 accept · Size: 583.6 KB · Lines: 11.0 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Countermodel certificate for an equational-theories implication, closed by decide. A magma on Fin 7 with an inline List operation table satisfies x ◇ y = z ◇ (w ◇ u) but not x = x ◇ x. Checking the certificate evaluates the decidable instance over all 7^5 ≈ 17k five-tuples; every ◇ unfolds to a linear lookup into the list.

From a corpus of certificates generated for the SAIR math distillation challenge (equational theories track). The small end of the list-table family; magma-list-pair-n21 is the same workload at a larger scale.

Test result: 👍 accepted · exit code 0 · wall time: 1.3 s · instructions: 15.3 G · max rss memory: 603.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 11031 lines
checked 337 constants ({AXIOM=1, DEF=157, THM=90}) and 28 inductive blocks in 1.23s
axioms declared: propext
all declarations verified

Test "perf/magma-string-n4"

Expected: 👍 accept · Size: 16.5 MB · Lines: 344.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Countermodel certificate for an equational-theories implication, closed by decide. A magma on Fin 4 with the operation table encoded as a String satisfies x ◇ x = y ◇ ((x ◇ (y ◇ z)) ◇ z) but not x ◇ x = x ◇ (((y ◇ x) ◇ y) ◇ z). The smallest magma of the family (4^3 tuples); the cost is dominated by decoding each table entry out of the string on every lookup.

From a corpus of certificates generated for the SAIR math distillation challenge (equational theories track). The small end of the string-table family; magma-string-pair-n9 is the same workload at a larger scale.

Test result: 👍 accepted · exit code 0 · wall time: 1.9 s · instructions: 29.5 G · max rss memory: 735.2 MB

stdout:
lean 4.34.1, export format 3.1.0, 344310 lines
checked 3520 constants ({AXIOM=3, DEF=1104, THM=2044, OPAQUE=1, QUOT=4}) and 112 inductive blocks in 1.77s
axioms declared: propext, Quot.sound, Classical.choice
all declarations verified
stderr:
... 1024 items, at DEF _private.Init.Data.Nat.Lemmas.0.Nat.mul_left_cancel.match_1_1
... 2048 items, at DEF _private.Init.Data.Nat.Lemmas.0.Nat.shiftLeft_succ.match_1_1
... 3072 items, at THM forall_exists_index

Test "perf/magma-string-pair-n9"

Expected: 👍 accept · Size: 16.6 MB · Lines: 344.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Countermodel certificate for an equational-theories implication, closed by decide. A magma on Fin 9 with the operation table encoded as a String satisfies x ◇ y = (((z ◇ w) ◇ y) ◇ x) ◇ y but not x ◇ y = ((z ◇ (z ◇ y)) ◇ x) ◇ y. Checking the certificate evaluates the decidable instance over all 9^4 ≈ 6.5k four-tuples, decoding each table entry out of the string on every lookup. The heaviest of the string-table tests.

From a corpus of certificates generated for the SAIR math distillation challenge (equational theories track). magma-string-n4 is the same workload at a smaller scale.

Test result: 👍 accepted · exit code 0 · wall time: 9.6 s · instructions: 90.1 G · max rss memory: 2.4 GB

stdout:
lean 4.34.1, export format 3.1.0, 344331 lines
checked 3520 constants ({AXIOM=3, DEF=1104, THM=2044, OPAQUE=1, QUOT=4}) and 112 inductive blocks in 9.29s
axioms declared: propext, Quot.sound, Classical.choice
all declarations verified
stderr:
... 1024 items, at DEF _private.Init.Data.Nat.Lemmas.0.Nat.mul_left_cancel.match_1_1
... 2048 items, at DEF _private.Init.Data.Nat.Lemmas.0.Nat.shiftLeft_succ.match_1_1
... 3072 items, at THM forall_exists_index
slow (7561 ms): DEF countermodel

Test "perf/proj-cheap-struct"

Expected: 👍 accept · Size: 85.9 KB · Lines: 1.5 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

(S u).re      and      (S ()).re

where u is a definition that unfolds to (), and reducing S _ to a constructor takes Θ(N) steps (it is a foldr over List.range N, with N = 2^17).

.re is a projection function, so both sides unfold to a primitive projection of S u and S (). Official reduces the structure of a projection during definitional equality only with whnf_core (no delta), compares the two stuck projections by their structures, and finds those equal by comparing the arguments of S. That is five unfoldings in all. A checker that fully reduces the structure of the projection to find a constructor evaluates S on both sides: Θ(N) steps, which runs into a step budget smaller than N.

Distilled from a Palomar submission, where the structure is a Finset.sum over Finset.range (2^17) under Complex.re.

Test result: 👍 accepted · exit code 0 · wall time: 157 ms · instructions: 1.3 G · max rss memory: 72.2 MB

stdout:
lean 4.34.1, export format 3.1.0, 1543 lines
checked 83 constants ({DEF=44, THM=1}) and 12 inductive blocks in 0.07s
axioms declared: none
all declarations verified

Test "perf/proj-lazy-struct"

Expected: 👍 accept · Size: 44.9 KB · Lines: 808 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

(P (slow 100000)).1      and      (Q (slow 100001)).1

where P a and Q a both unfold to (0, a), and slow n takes Θ(n) steps to evaluate.

Official compares two projections of the same structure by lazily unfolding their structs, and projects as soon as neither side unfolds any further: after unfolding P and Q, it compares just the first fields, 0 and 0. That is four unfoldings in all. A checker that instead compares the two structs completely (here (0, slow 100000) and (0, slow 100001)) before projecting also compares the second fields, which differ, and does so by evaluating slow.

This is the counterpart of proj-cheap-struct, where the structs must not be evaluated because they are equal by their arguments.

Test result: 👍 accepted · exit code 0 · wall time: 159 ms · instructions: 986.9 M · max rss memory: 68.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 808 lines
checked 48 constants ({DEF=22, THM=1}) and 8 inductive blocks in 0.07s
axioms declared: none
all declarations verified

Test "perf/proj-stuck-struct"

Expected: 👍 accept · Size: 50.1 KB · Lines: 916 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A definitional equality under a projection whose structure argument is stuck, distilled from a fuel-bridge lemma of con-leche's own proof library, on which con-leche ran out of memory.

step c n x : Nat × Nat recurses structurally on the fuel n; for a variable x each level is stuck on match x, and each branch reads .1 of two recursive calls. stepN checks (step (id c) N x).1 = (step c N x).1 by rfl, the sides differing only in id c vs c.

A checker that leaves a stuck projection's structure argument alone (as the reference kernel's whnf_core does when reduce_proj fails) compares step (id c) N x =?= step c N x, tries the arguments first, and is done at once. A checker that replaces it by its weak head normal form has lost the step head and unrolls the recursion tree on both sides: exponential in N (con-leche before the fix: 0.2 s, 2 s, 17 s and 73 MB, 0.4 GB, 2.6 GB for N = 12, 16, 20; official, nanoda, lean4lean: ~0.02 s at every N).

Test result: 👍 accepted · exit code 0 · wall time: 154 ms · instructions: 953.6 M · max rss memory: 68.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 916 lines
checked 51 constants ({DEF=23, THM=3}) and 8 inductive blocks in 0.07s
axioms declared: none
all declarations verified

Test "perf/refute-cheap-first"

Expected: ✋ reject · Size: 20.7 KB · Lines: 439 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check claims

(false, count #n) = (true, count #(n+1))

and must be rejected. Both sides are constructor applications, so comparing components is the only route, and either component refutes on its own: false against true for Θ(1), the numerals for Θ(n²) (count #k evaluates to #k in Θ(k²) reductions). The test asks in which order a checker visits the components. refute-cheap-last.lean swaps them, and the ratio between the two files is what that order costs.

N=200 in the Lean source. From Courant and Leroy, POPL 2026, §10, where the two orders cost Rocq 4 × 10⁻⁶ s and 0.61 s.

Test result: ✋ rejected · exit code 1 · wall time: 151 ms · instructions: 797.9 M · max rss memory: 66.2 MB

stdout:
REJECTED THM kernel_refute_cheap_first: declaration type mismatch, kernel_refute_cheap_first
  value has type: (Eq.{[1]} (Prod.{[0, 0]} Bool N) (Prod.mk.{[0, 0]} Bool N Bool.false (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?)))))))))))))))))))))))))))))))))))))))) (Prod.mk.{[0, 0]} Bool N Bool.false (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?)))))))))))))))))))))))))))))))))))))))))
  but is expected to have type: (Eq.{[1]} (Prod.{[0, 0]} Bool N) (Prod.mk.{[0, 0]} Bool N Bool.false (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?)))))))))))))))))))))))))))))))))))))))) (Prod.mk.{[0, 0]} Bool N Bool.true (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?)))))))))))))))))))))))))))))))))))))))))
lean 4.34.1, export format 3.1.0, 439 lines
checked 16 constants ({DEF=2}) and 4 inductive blocks in 0.06s
axioms declared: none
1 declaration(s) rejected

Test "perf/refute-cheap-last"

Expected: ✋ reject · Size: 20.5 KB · Lines: 439 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check claims

(count #n, false) = (count #(n+1), true)

and must be rejected: refute-cheap-first.lean with the components swapped, so the cheap refutation sits behind the expensive one for a checker that visits components left to right.

N=200 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Test result: ✋ rejected · exit code 1 · wall time: 246 ms · instructions: 3.8 G · max rss memory: 126.5 MB

stdout:
REJECTED THM kernel_refute_cheap_last: declaration type mismatch, kernel_refute_cheap_last
  value has type: (Eq.{[1]} (Prod.{[0, 0]} N Bool) (Prod.mk.{[0, 0]} N Bool (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?))))))))))))))))))))))))))))))))))))))) Bool.false) (Prod.mk.{[0, 0]} N Bool (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?))))))))))))))))))))))))))))))))))))))) Bool.false))
  but is expected to have type: (Eq.{[1]} (Prod.{[0, 0]} N Bool) (Prod.mk.{[0, 0]} N Bool (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?))))))))))))))))))))))))))))))))))))))) Bool.false) (Prod.mk.{[0, 0]} N Bool (count (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (N.S (? ?))))))))))))))))))))))))))))))))))))))) Bool.true))
lean 4.34.1, export format 3.1.0, 439 lines
checked 16 constants ({DEF=2}) and 4 inductive blocks in 0.15s
axioms declared: none
1 declaration(s) rejected

Test "perf/repeated-subproblem"

Expected: 👍 accept · Size: 11.4 KB · Lines: 214 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

perfect #n leaf      and      perfect #(n-1) (node leaf leaf)

where perfect #k t builds the perfect binary tree of depth k with leaves t, in k steps that each duplicate the tree so far into both arguments of Tr.node.

Both sides reduce to the perfect tree of depth n. Descending them meets Tr.node u u against Tr.node v v at every level, where both argument positions pose the same subproblem, so the recursion reaches 2^n pairs of nodes of which n are distinct. The test asks whether a checker records the pairs it has proved convertible: Θ(n) if it does, Θ(2ⁿ) if not.

N=20 in the Lean source, stepped up by one rather than doubled. From Courant and Leroy, POPL 2026, §10.

Test result: 👍 accepted · exit code 0 · wall time: 134 ms · instructions: 713.3 M · max rss memory: 65.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 214 lines
checked 13 constants ({DEF=1, THM=1}) and 3 inductive blocks in 0.05s
axioms declared: none
all declarations verified

Test "perf/shared-subterm"

Expected: 👍 accept · Size: 50.1 KB · Lines: 1.3 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

ldepth (perfect #n leaf)      and      ldepth2 (perfect #n leaf)

where perfect #n leaf builds the perfect binary tree of depth n in n steps that each duplicate the tree so far, and ldepth and ldepth2 both return the length of the leftmost path.

The head constants differ, so both sides are evaluated, and neither traversal looks beyond the leftmost path: ldepth walks n nodes for Θ(n), ldepth2 folds n additions over growing numerals for Θ(n²). The test asks whether a checker consumes the tree through its representation, for Θ(n²), or expands it into the 2ⁿ nodes of its normal form.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §10.

Test result: 👍 accepted · exit code 0 · wall time: 179 ms · instructions: 2.2 G · max rss memory: 84.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 1252 lines
checked 16 constants ({DEF=4, THM=1}) and 3 inductive blocks in 0.10s
axioms declared: none
all declarations verified

Test "perf/shift-cascade"

Expected: 👍 accept · Size: 256.3 KB · Lines: 5.1 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Stress test for cascading substitution overhead in kernel let processing.

N nested let bindings inside a lambda, where each value references the outer lambda parameter and the previous binding:

fun (a : Nat → Nat) => let f₁ := fun x => a x let f₂ := fun x => a (f₁ x) ... let fₙ := fun x => a (fₙ₋₁ x) fₙ 0

The kernel processes each let by substituting the value into the body. Each value has a free bvar (references a), so substitution under inner binders creates shifted copies. In a de Bruijn kernel with deferred shifts, these Shift(val, offset) wrappers accumulate: step k must traverse through O(k) wrappers from previous steps, giving O(N²) total work.

A locally-nameless kernel substitutes fvars that need no shifting, giving O(N) total.

N=1000 in the Lean source. Increase to stress further.

Test result: 👍 accepted · exit code 0 · wall time: 179 ms · instructions: 1.8 G · max rss memory: 81.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 5131 lines
checked 10 constants ({DEF=3}) and 2 inductive blocks in 0.09s
axioms declared: none
all declarations verified

Test "perf/unroll-versus-evaluate"

Expected: 👍 accept · Size: 44.6 KB · Lines: 1.2 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The declaration to check compares

count #(n+1)      and      N.add (count #n) #1

where #k is the numeral with k successors, and count #k evaluates to #k in Θ(k²) reductions.

The head constants differ. Unrolling count once turns the left side into the right side, leaving a traversal of the shared numeral #n, for Θ(n); evaluating both sides costs Θ(n²). The test asks which of two differing head constants a checker chooses to unfold.

N=1000 in the Lean source. From Courant and Leroy, POPL 2026, §2.

Test result: 👍 accepted · exit code 0 · wall time: 136 ms · instructions: 970.6 M · max rss memory: 68.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 1159 lines
checked 10 constants ({DEF=2, THM=1}) and 2 inductive blocks in 0.06s
axioms declared: none
all declarations verified

Test "std"

Expected: 👍 accept · Size: 569.0 MB · Lines: 10.8 M · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The complete Std library export from Lean 4.

This test contains the standard library extensions beyond core Lean 4, including:

  • Enhanced data structures (HashMap, RBTree, etc.)
  • Additional mathematical operations
  • Extended list and array operations
  • Utility functions and theorems

This represents a medium-sized test case, larger than core modules but smaller than Mathlib, making it useful for performance testing.

Test result: 👍 accepted · exit code 0 · wall time: 59.1 s · instructions: 368.6 G · max rss memory: 4.8 GB

stdout:
lean 4.34.1, export format 3.1.0, 10826639 lines
checked 104059 constants ({AXIOM=7, DEF=27980, THM=71839, OPAQUE=399, QUOT=4}) and 1057 inductive blocks in 58.78s
axioms declared: propext, Quot.sound, Classical.choice, Lean.trustCompiler, Lean.ofReduceNat, sorryAx, Lean.ofReduceBool
all declarations verified
stderr:
... 1024 items, at THM Nat.lt_of_sub_ne_zero
... 2048 items, at THM _private.Init.Data.Array.Basic.0.PSigma.casesOn._arg_pusher
... 3072 items, at THM Std.DHashMap.Internal.Raw?.Const.alter?._proof_3
... 4096 items, at DEF Std.DTreeMap.Internal.Impl.insertMin.match_1
... 5120 items, at THM List.find?_cons_of_neg
... 6144 items, at THM List.not_all_eq_any_not
... 7168 items, at THM _private.Init.Data.String.Decode.0.parseFirstByte_eq_twoMore_of_utf8DecodeChar?_eq_some._proof_1_4
... 8192 items, at DEF instDecidableEqRaw
... 9216 items, at THM _private.Init.Data.Range.Polymorphic.Instances.0.Std.Rxo.LawfulHasSize.of_closed._simp_2
... 10240 items, at inductive Std.DTreeMap.Internal.Const.RioSliceData
... 11264 items, at THM Std.DHashMap.Internal.Raw?.Const.get_alter._proof_2
... 12288 items, at DEF _private.Init.Data.Iterators.Lemmas.Combinators.Monadic.FilterMap.0.Std.IterM.step_filterMapWithPostcondition.match_1_1
... 13312 items, at DEF _private.Init.Data.Int.DivMod.Lemmas.0.Int.tmod_lt_of_pos.match_1_1
... 14336 items, at DEF Std.DTreeMap.Internal.Impl.minView!._f
... 15360 items, at THM Std.DHashMap.Internal.Raw?.Const.distinct_keys_toList
... 16384 items, at THM Vector.mk_eq
... 17408 items, at DEF Lean.ParserDescr.const.elim
... 18432 items, at THM String.Slice.Pos.revSkip?_eq_map_skipSuffix?
... 19456 items, at OPAQUE Lean.Syntax.setTailInfoAux
... 20480 items, at THM Lean.Grind.Linarith.instBEqPoly.beq._sparseCasesOn_1.else_eq
... 21504 items, at THM Std.Tactic.BVDecide.BVExpr.bitblast.blastRotateRight._proof_4
... 22528 items, at THM _private.Init.Data.BitVec.Lemmas.0.BitVec.getLsbD_sshiftRight._simp_1_5
... 23552 items, at THM Fin.rev._proof_1
... 24576 items, at THM ISize.toInt64_ne_minValue
... 25600 items, at THM String.Slice.Pattern.Model.LawfulBackwardPatternModel.skipSuffix?_sliceTo_eq_none_iff
... 26624 items, at DEF Std.Time.TimeZone.TransitionRule.spec
... 27648 items, at DEF Prod._sizeOf_inst
... 28672 items, at THM Std.Do.SPred.and_elim_r'
... 29696 items, at THM String.getUTF8Byte.congr_simp
... 30720 items, at THM String.Slice.Pattern.Model.IsLongestRevMatchAtChain.sliceFrom._proof_1
... 31744 items, at THM _private.Std.Tactic.BVDecide.LRAT.Internal.Formula.RatAddSound.0.Std.Tactic.BVDecide.LRAT.Internal.DefaultFormula.safe_insert_of_performRatCheck_fold_success._simp_1_15
... 32768 items, at DEF System.Uri.unescapeUri
... 33792 items, at THM Std.LawfulOrderMax.toLawfulOrderSup
... 34816 items, at DEF _private.Std.Sync.Channel.0.Std.CloseableChannel.Unbounded.tryRecv'
... 35840 items, at DEF Std.Http.Server.Handler.onContinue
... 36864 items, at THM Std.DHashMap.Internal.Raw?.Const.insertManyIfNewUnit_ind
... 37888 items, at THM _private.Std.Time.Date.ValidDate.0.Std.Time.ValidDate.ofOrdinal._proof_6
... 38912 items, at DEF Float.Model.casesOn
... 39936 items, at DEF Lean.Grind.CommRing.Poly.powC._f
... 40960 items, at THM Lean.Order.fun_csup_is_sup
... 41984 items, at THM Vector.set!_eq_setIfInBounds
... 43008 items, at DEF Lean.Grind.AC.Context.noConfusion
... 44032 items, at THM Std.Tactic.BVDecide.BVExpr.bitblast.blastUdiv.BlastUdivOutput.mk.inj
... 45056 items, at THM _private.Init.Data.BitVec.Lemmas.0.BitVec.cpopNatRec_allOnes._proof_1_2
... 46080 items, at DEF Std.HashSet.Raw.instForInOfMonad
... 47104 items, at DEF Std.Http.Server.StatelessHandler.mk.noConfusion
... 48128 items, at THM Int8.zero_shiftLeft
... 49152 items, at DEF Std.Async.UDP.Socket.bind
... 50176 items, at DEF Std.Http.Protocol.H1.RedirectPlan.origin
... 51200 items, at THM List.Cursor.length_suffix_le_length
... 52224 items, at THM Std.DTreeMap.Internal.Impl.keys_insertIfNew!_perm
... 53248 items, at THM Array.pmap_eq_self
... 54272 items, at DEF _private.Init.Data.Nat.Lemmas.0.Nat.lt_mul_self_iff.match_1_1
... 55296 items, at THM Std.DTreeMap.Raw.isEmpty_inter_iff
... 56320 items, at THM ISize.toNatClampNeg_eq_zero_iff
... 57344 items, at THM Std.Internal.Do.Spec.forInWithInvariant
... 58368 items, at THM List.head_append_left._proof_1
... 59392 items, at THM Std.DTreeMap.Internal.Impl.minKey_insertIfNew_le_self
... 60416 items, at DEF Int.Internal.Linear.cooper_dvd_left_cert
... 61440 items, at DEF Std.DTreeMap.Raw.instSliceableRooSlice._auto_1
... 62464 items, at DEF instMonadExceptOfEST
... 63488 items, at DEF Std.Net.IPv6Addr.ofParts
... 64512 items, at THM Std.DTreeMap.Equiv.union_left
... 65536 items, at DEF _private.Init.Data.List.MinMaxOn.0.List.minOn_eq_head.match_1_1
... 66560 items, at THM BitVec.getMsbD_umod
... 67584 items, at THM ISize.ofNat_add
... 68608 items, at THM Std.DHashMap.Const.toList_filterMap
... 69632 items, at THM _private.Init.Data.BitVec.Lemmas.0.BitVec.getMsbD_sshiftRight._simp_1_2
... 70656 items, at DEF Setoid.casesOn
... 71680 items, at THM Std.ExtHashSet.get?_empty
... 72704 items, at DEF _private.Std.Http.Protocol.H1.Error.0.Std.Http.Protocol.H1.instBEqError.beq.match_1
... 73728 items, at THM _private.Init.Data.Int.Gcd.0.Int.lcm_pos._simp_1_1
... 74752 items, at DEF CoeTail.ctorIdx
... 75776 items, at THM ExceptCpsT.run_bind_throw
... 76800 items, at THM Std.DHashMap.Internal.Raw?.size_filterMap_eq_size_iff
... 77824 items, at DEF Std.Time.Millisecond.instOfNatOrdinal._aux_1
... 78848 items, at THM BitVec.toNat_cpop_append
... 79872 items, at THM Std.HashMap.getKey_union_of_mem_right
... 80896 items, at THM UInt16.toUInt8_ofNatTruncate_of_le
... 81920 items, at THM Std.HashMap.Raw.getElem_modify
... 82944 items, at THM BitVec.getElem_shiftConcat_zero
... 83968 items, at THM Std.Internal.Do.Spec.liftWith_trans
... 84992 items, at THM Lean.Parser.Tactic.MRefinePat.stateful.sizeOf_spec
... 86016 items, at THM Lean.Grind.CommRing.Stepwise.mul
... 87040 items, at THM Int.Internal.Linear.le_of_le
... 88064 items, at THM Int8.add_right_neg
... 89088 items, at THM UInt16.ofNatLT_sub
... 90112 items, at DEF MonadExcept.recOn
... 91136 items, at THM Vector.find?_flatMap
... 92160 items, at THM Array.getElem_swapIfInBounds_left
... 93184 items, at DEF Std.Tactic.BVDecide.BVBinOp.instToString
... 94208 items, at DEF List.tail_attach.match_1
... 95232 items, at THM _private.Init.Data.String.Lemmas.Pattern.TakeDrop.Char.0.String.Slice.Pos.revSkip?_char_eq_some_iff._simp_1_1
... 96256 items, at THM List.mapFinIdx_mapFinIdx._proof_1
... 97280 items, at THM have_unused'
... 98304 items, at THM Int.ofNat_nonneg
... 99328 items, at DEF Std.Time.ZoneId.noConfusion
... 100352 items, at THM Vector.append_eq_replicate_iff

Test "tutorial/001_basicDef"

Expected: 👍 accept · Size: 367 B · Lines: 6 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Basic definition

Test result: 👍 accepted · exit code 0 · wall time: 84 ms · instructions: 548.4 M · max rss memory: 64.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 6 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/002_badDef"

Expected: ✋ reject · Size: 365 B · Lines: 6 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Mismatched types

Test result: ✋ rejected · exit code 1 · wall time: 95 ms · instructions: 594.6 M · max rss memory: 64.5 MB

stdout:
REJECTED DEF badDef: declaration type mismatch, badDef
  value has type: Sort(2)
  but is expected to have type: Sort(0)
lean 4.34.1, export format 3.1.0, 6 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/003_arrowType"

Expected: 👍 accept · Size: 622 B · Lines: 12 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Arrow type (function type)

Test result: 👍 accepted · exit code 0 · wall time: 87 ms · instructions: 544.1 M · max rss memory: 63.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 12 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/004_dependentType"

Expected: 👍 accept · Size: 460 B · Lines: 7 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Dependent type (forall)

Test result: 👍 accepted · exit code 0 · wall time: 86 ms · instructions: 545.6 M · max rss memory: 63.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 7 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/005_constType"

Expected: 👍 accept · Size: 897 B · Lines: 17 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Lambda expression

Test result: 👍 accepted · exit code 0 · wall time: 84 ms · instructions: 548.1 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 17 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/006_betaReduction"

Expected: 👍 accept · Size: 1.3 KB · Lines: 27 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Lambda reduction

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 568.0 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 27 lines
checked 2 constants ({DEF=2}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/007_betaReduction2"

Expected: 👍 accept · Size: 1.4 KB · Lines: 28 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Lambda reduction under binder

Test result: 👍 accepted · exit code 0 · wall time: 95 ms · instructions: 568.4 M · max rss memory: 63.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 28 lines
checked 2 constants ({DEF=2}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/008_forallSortWhnf"

Expected: 👍 accept · Size: 1.2 KB · Lines: 25 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The binding domain of a forall may need to be reduce before it is a sort

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 559.9 M · max rss memory: 63.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 25 lines
checked 2 constants ({DEF=2}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/009_forallSortBad"

Expected: ✋ reject · Size: 1.2 KB · Lines: 26 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The binding domain of a forall has to be a sort

Test result: ✋ rejected · exit code 1 · wall time: 101 ms · instructions: 584.7 M · max rss memory: 64.1 MB

stdout:
REJECTED DEF forallSortBad: type expected
  term: _f6
  has type: _f5
lean 4.34.1, export format 3.1.0, 26 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/010_nonTypeType"

Expected: ✋ reject · Size: 1.1 KB · Lines: 21 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The type of a declaration has to be a type, not some other expression

Test result: ✋ rejected · exit code 1 · wall time: 95 ms · instructions: 579.5 M · max rss memory: 64.2 MB

stdout:
REJECTED DEF nonTypeType: type expected
  term: constType
  has type: (? a._@._internal._hyg.0 : Sort(1), (? a._@._internal._hyg.0 : Sort(1), Sort(1)))
lean 4.34.1, export format 3.1.0, 21 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/011_nonTypeAxiom"

Expected: ✋ reject · Size: 1.0 KB · Lines: 20 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

This applies to axioms as well, which are easy to overlook because they have no value to check the type against. Letting one through is not merely untidy: an axiom whose type is an arbitrary term inhabits whatever that term is later found definitionally equal to, and the eta and proof irrelevance rules are happy to equate a term like this with a great many things.

Test result: ✋ rejected · exit code 1 · wall time: 95 ms · instructions: 582.7 M · max rss memory: 64.3 MB

stdout:
REJECTED AXIOM nonTypeAxiom: type expected
  term: constType
  has type: (? a._@._internal._hyg.0 : Sort(1), (? a._@._internal._hyg.0 : Sort(1), Sort(1)))
lean 4.34.1, export format 3.1.0, 20 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/012_nonPropThm"

Expected: ✋ reject · Size: 424 B · Lines: 7 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The type of a theorem has to be a proposition

Test result: ✋ rejected · exit code 1 · wall time: 97 ms · instructions: 553.8 M · max rss memory: 63.9 MB

stdout:
REJECTED THM nonPropThm: theorem type is not a proposition: nonPropThm
lean 4.34.1, export format 3.1.0, 7 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/013_thmProof"

Expected: 👍 accept · Size: 1.3 KB · Lines: 26 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A theorem can refer to another theorem

Test result: 👍 accepted · exit code 0 · wall time: 94 ms · instructions: 556.1 M · max rss memory: 64.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 26 lines
checked 2 constants ({THM=2}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/014_selfProof"

Expected: ✋ reject · Size: 459 B · Lines: 8 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A theorem cannot refer to itself

Test result: ✋ rejected · exit code 1 · wall time: 98 ms · instructions: 571.6 M · max rss memory: 64.3 MB

stdout:
REJECTED THM selfProof: unknown constant selfProof
lean 4.34.1, export format 3.1.0, 8 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/015_levelComp1"

Expected: 👍 accept · Size: 391 B · Lines: 7 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Some level computation

Test result: 👍 accepted · exit code 0 · wall time: 91 ms · instructions: 537.2 M · max rss memory: 63.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 7 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/016_levelComp2"

Expected: 👍 accept · Size: 409 B · Lines: 8 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Some level computation

Test result: 👍 accepted · exit code 0 · wall time: 89 ms · instructions: 532.9 M · max rss memory: 63.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 8 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/017_levelComp3"

Expected: 👍 accept · Size: 427 B · Lines: 9 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Some level computation

Test result: 👍 accepted · exit code 0 · wall time: 83 ms · instructions: 543.6 M · max rss memory: 63.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 9 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/018_levelParams"

Expected: 👍 accept · Size: 1.4 KB · Lines: 29 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Level parameters

Test result: 👍 accepted · exit code 0 · wall time: 92 ms · instructions: 530.0 M · max rss memory: 64.2 MB

stdout:
lean 4.34.1, export format 3.1.0, 29 lines
checked 2 constants ({DEF=2}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/019_tut06_bad01"

Expected: ✋ reject · Size: 427 B · Lines: 8 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Duplicate universe parameters

Test result: ✋ rejected · exit code 1 · wall time: 99 ms · instructions: 561.2 M · max rss memory: 63.9 MB

stdout:
REJECTED DEF tut06_bad01: duplicate universe parameter u
lean 4.34.1, export format 3.1.0, 8 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/020_levelComp4"

Expected: 👍 accept · Size: 424 B · Lines: 8 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Some level computation

Test result: 👍 accepted · exit code 0 · wall time: 87 ms · instructions: 544.8 M · max rss memory: 64.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 8 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/021_levelComp5"

Expected: 👍 accept · Size: 424 B · Lines: 8 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Some level computation

Test result: 👍 accepted · exit code 0 · wall time: 85 ms · instructions: 543.4 M · max rss memory: 63.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 8 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/022_imax1"

Expected: 👍 accept · Size: 809 B · Lines: 16 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type inference for forall using imax

Test result: 👍 accepted · exit code 0 · wall time: 87 ms · instructions: 543.3 M · max rss memory: 63.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 16 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/023_imax2"

Expected: 👍 accept · Size: 828 B · Lines: 17 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type inference for forall using imax

Test result: 👍 accepted · exit code 0 · wall time: 96 ms · instructions: 543.8 M · max rss memory: 64.2 MB

stdout:
lean 4.34.1, export format 3.1.0, 17 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/024_levelMaxComm"

Expected: 👍 accept · Size: 524 B · Lines: 12 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Level equality: max is commutative (max u v ≈ max v u).

Test result: 👍 accepted · exit code 0 · wall time: 88 ms · instructions: 544.0 M · max rss memory: 63.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 12 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
all declarations verified

Test "tutorial/025_levelMaxAssoc"

Expected: 👍 accept · Size: 623 B · Lines: 16 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Level equality: max is associative (max (max u v) w ≈ max u (max v w)).

Test result: 👍 accepted · exit code 0 · wall time: 96 ms · instructions: 546.7 M · max rss memory: 63.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 16 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/026_levelMaxIdem"

Expected: 👍 accept · Size: 447 B · Lines: 9 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Level equality: max is idempotent (max u u ≈ u).

Test result: 👍 accepted · exit code 0 · wall time: 90 ms · instructions: 542.7 M · max rss memory: 63.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 9 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/027_levelMaxAbsorb"

Expected: 👍 accept · Size: 526 B · Lines: 12 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Level equality: max absorption (max u (max u v) ≈ max u v).

Test result: 👍 accepted · exit code 0 · wall time: 101 ms · instructions: 542.6 M · max rss memory: 63.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 12 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/028_inferVar"

Expected: 👍 accept · Size: 713 B · Lines: 12 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type inference of local variables

Test result: 👍 accepted · exit code 0 · wall time: 103 ms · instructions: 550.4 M · max rss memory: 63.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 12 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/029_defEqLambda"

Expected: 👍 accept · Size: 1.4 KB · Lines: 26 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Definitional equality between lambdas

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 552.8 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 26 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/030_peano1"

Expected: 👍 accept · Size: 3.6 KB · Lines: 73 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Peano arithmetic: 2 = 2

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 547.9 M · max rss memory: 63.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 73 lines
checked 7 constants ({DEF=6, THM=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/031_peano2"

Expected: 👍 accept · Size: 4.5 KB · Lines: 90 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Peano arithmetic: 1 + 1 = 2

Test result: 👍 accepted · exit code 0 · wall time: 109 ms · instructions: 596.3 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 90 lines
checked 8 constants ({DEF=7, THM=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/032_peano3"

Expected: 👍 accept · Size: 4.9 KB · Lines: 98 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Peano arithmetic: 2 * 2 = 4

Test result: 👍 accepted · exit code 0 · wall time: 100 ms · instructions: 558.7 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 98 lines
checked 10 constants ({DEF=9, THM=1}) and 0 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/033_letType"

Expected: 👍 accept · Size: 489 B · Lines: 9 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type checking a non-dependent let

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 538.7 M · max rss memory: 64.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 9 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/034_letTypeDep"

Expected: 👍 accept · Size: 1.2 KB · Lines: 26 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type checking a dependent let

Test result: 👍 accepted · exit code 0 · wall time: 114 ms · instructions: 565.5 M · max rss memory: 64.2 MB

stdout:
lean 4.34.1, export format 3.1.0, 26 lines
checked 3 constants ({AXIOM=2, DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: aDepProp, mkADepProp
all declarations verified

Test "tutorial/035_letRed"

Expected: 👍 accept · Size: 627 B · Lines: 12 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reducing a let

Test result: 👍 accepted · exit code 0 · wall time: 103 ms · instructions: 561.2 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 12 lines
checked 2 constants ({AXIOM=1, DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: aProp
all declarations verified

Test "tutorial/036_empty"

Expected: 👍 accept · Size: 1.2 KB · Lines: 20 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A simple empty inductive type

Test result: 👍 accepted · exit code 0 · wall time: 100 ms · instructions: 583.6 M · max rss memory: 64.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 20 lines
checked 3 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/037_boolType"

Expected: 👍 accept · Size: 2.3 KB · Lines: 37 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A simple enumeration inductive type

Test result: 👍 accepted · exit code 0 · wall time: 103 ms · instructions: 578.2 M · max rss memory: 65.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 37 lines
checked 5 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/038_twoBool"

Expected: 👍 accept · Size: 4.2 KB · Lines: 65 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A simple product type

Test result: 👍 accepted · exit code 0 · wall time: 96 ms · instructions: 599.1 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 65 lines
checked 8 constants ({DEF=1}) and 2 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/039_andType"

Expected: 👍 accept · Size: 3.2 KB · Lines: 57 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A parametrized product type (no level parameters)

Test result: 👍 accepted · exit code 0 · wall time: 112 ms · instructions: 602.0 M · max rss memory: 64.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 57 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/040_prodType"

Expected: 👍 accept · Size: 3.8 KB · Lines: 76 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A parametrized product type (with level parameters)

Test result: 👍 accepted · exit code 0 · wall time: 118 ms · instructions: 599.3 M · max rss memory: 64.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 76 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/041_pprodType"

Expected: 👍 accept · Size: 3.8 KB · Lines: 75 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A parametrized product type (with more general level parameters)

Test result: 👍 accepted · exit code 0 · wall time: 113 ms · instructions: 619.4 M · max rss memory: 64.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 75 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/042_pUnitType"

Expected: 👍 accept · Size: 1.8 KB · Lines: 31 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Level-polymorphic unit type

Test result: 👍 accepted · exit code 0 · wall time: 111 ms · instructions: 608.3 M · max rss memory: 64.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 31 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/043_eqType"

Expected: 👍 accept · Size: 3.2 KB · Lines: 62 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Equality, as an important indexed non-recursive data type

Test result: 👍 accepted · exit code 0 · wall time: 112 ms · instructions: 578.7 M · max rss memory: 63.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 62 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/044_natDef"

Expected: 👍 accept · Size: 3.3 KB · Lines: 61 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A recursive inductive data type

Test result: 👍 accepted · exit code 0 · wall time: 98 ms · instructions: 595.9 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 61 lines
checked 5 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/045_rbTreeDef"

Expected: 👍 accept · Size: 15.7 KB · Lines: 296 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A recursive indexed data type

Test result: 👍 accepted · exit code 0 · wall time: 123 ms · instructions: 753.1 M · max rss memory: 64.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 296 lines
checked 14 constants ({DEF=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/046_inductBadNonSort"

Expected: ✋ reject · Size: 1.2 KB · Lines: 20 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive type with a non-sort type

Test result: ✋ rejected · exit code 1 · wall time: 109 ms · instructions: 588.9 M · max rss memory: 64.4 MB

stdout:
REJECTED inductive inductBadNonSort: type expected
  term: constType
  has type: (? a._@._internal._hyg.0 : Sort(1), (? a._@._internal._hyg.0 : Sort(1), Sort(1)))
lean 4.34.1, export format 3.1.0, 20 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/047_inductBadNonSort2"

Expected: ✋ reject · Size: 598 B · Lines: 8 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Another inductive type with a non-sort type

Test result: ✋ rejected · exit code 1 · wall time: 100 ms · instructions: 541.2 M · max rss memory: 64.4 MB

stdout:
REJECTED inductive inductBadNonSort2: type expected
  term: aType
  has type: aType
lean 4.34.1, export format 3.1.0, 8 lines
checked 1 constants ({AXIOM=1}) and 0 inductive blocks in 0.03s
axioms declared: aType
1 declaration(s) rejected

Test "tutorial/048_inductLevelParam"

Expected: ✋ reject · Size: 515 B · Lines: 7 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive with duplicate level params

Test result: ✋ rejected · exit code 1 · wall time: 105 ms · instructions: 557.9 M · max rss memory: 64.1 MB

stdout:
REJECTED inductive inductLevelParam: export has 0 recursors but 1 are expected
lean 4.34.1, export format 3.1.0, 7 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/049_inductTooFewParams"

Expected: ✋ reject · Size: 548 B · Lines: 6 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive with too few parameters in the type

Test result: ✋ rejected · exit code 1 · wall time: 96 ms · instructions: 567.2 M · max rss memory: 64.2 MB

stdout:
REJECTED inductive inductTooFewParams: number of parameters mismatch in inductive datatype declaration
lean 4.34.1, export format 3.1.0, 6 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/050_inductWrongCtorParams"

Expected: ✋ reject · Size: 1.2 KB · Lines: 16 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive with a constructor with wrong parameters

Test result: ✋ rejected · exit code 1 · wall time: 107 ms · instructions: 575.0 M · max rss memory: 64.4 MB

stdout:
REJECTED inductive inductWrongCtorParams: arg #1 of 'inductWrongCtorParams.mk' does not match inductive datatype parameters
lean 4.34.1, export format 3.1.0, 16 lines
checked 1 constants ({AXIOM=1}) and 0 inductive blocks in 0.04s
axioms declared: aProp
1 declaration(s) rejected

Test "tutorial/051_inductWrongCtorResParams"

Expected: ✋ reject · Size: 1.3 KB · Lines: 19 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive with a constructor with wrong parameters in result (they are swapped)

Test result: ✋ rejected · exit code 1 · wall time: 113 ms · instructions: 597.2 M · max rss memory: 65.0 MB

stdout:
REJECTED inductive inductWrongCtorResParams: invalid return type for 'inductWrongCtorResParams.mk'
lean 4.34.1, export format 3.1.0, 19 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/052_inductWrongCtorResLevel"

Expected: ✋ reject · Size: 1.4 KB · Lines: 23 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive with a constructor with wrong level parameters in result (they are swapped)

Test result: ✋ rejected · exit code 1 · wall time: 109 ms · instructions: 604.5 M · max rss memory: 64.3 MB

stdout:
REJECTED inductive inductWrongCtorResLevel: invalid return type for 'inductWrongCtorResLevel.mk'
lean 4.34.1, export format 3.1.0, 23 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/053_inductInIndex"

Expected: ✋ reject · Size: 1.1 KB · Lines: 14 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A constructor with an unexpected occurrence of the type in index position of a return type.

Test result: ✋ rejected · exit code 1 · wall time: 110 ms · instructions: 609.5 M · max rss memory: 64.8 MB

stdout:
REJECTED inductive inductInIndex: inductive occurrence in an index of the result type of 'inductInIndex.mk'
lean 4.34.1, export format 3.1.0, 14 lines
checked 1 constants ({AXIOM=1}) and 0 inductive blocks in 0.04s
axioms declared: aProp
1 declaration(s) rejected

Test "tutorial/054_indNeg"

Expected: ✋ reject · Size: 996 B · Lines: 12 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The classic example of an inductive with negative recursive occurrence

Test result: ✋ rejected · exit code 1 · wall time: 105 ms · instructions: 603.3 M · max rss memory: 65.0 MB

stdout:
REJECTED inductive indNeg: arg #1 of 'indNeg.mk' has a non positive occurrence of the datatypes being declared
lean 4.34.1, export format 3.1.0, 12 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/055_reduceCtorParam.mk"

Expected: 👍 accept · Size: 4.1 KB · Lines: 80 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

When checking inductives, we expect the kernel to reduce the types of constructor arguments.

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 561.6 M · max rss memory: 64.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 80 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/056_reduceCtorType.mk"

Expected: ✋ reject · Size: 1.5 KB · Lines: 26 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

When checking inductives, we expect the kernel to not reduce the type of the constructor itself; that should be all manifest foralls

Test result: ✋ rejected · exit code 1 · wall time: 111 ms · instructions: 558.9 M · max rss memory: 64.1 MB

stdout:
REJECTED inductive reduceCtorType: invalid return type for 'reduceCtorType.mk'
lean 4.34.1, export format 3.1.0, 26 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/057_indNegReducible"

Expected: ✋ reject · Size: 1.9 KB · Lines: 31 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

When checking inductives, we expect the kernel to not reduce the type of the constructor parameters further than head normal form. Recursive occurrences nested inside the head normal form are considered negative occurrences, even if they could be reduced to disappear.

Test result: ✋ rejected · exit code 1 · wall time: 113 ms · instructions: 608.3 M · max rss memory: 64.3 MB

stdout:
REJECTED inductive indNegReducible: arg #1 of 'indNegReducible.mk' has a non positive occurrence of the datatypes being declared
lean 4.34.1, export format 3.1.0, 31 lines
checked 2 constants ({AXIOM=1, DEF=1}) and 0 inductive blocks in 0.04s
axioms declared: aType
1 declaration(s) rejected

Test "tutorial/058_predWithTypeField"

Expected: 👍 accept · Size: 2.0 KB · Lines: 32 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive proposition can have constructors with fields of arbitrary level.

Test result: 👍 accepted · exit code 0 · wall time: 115 ms · instructions: 577.4 M · max rss memory: 64.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 32 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/059_typeWithTypeField"

Expected: 👍 accept · Size: 2.1 KB · Lines: 36 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive type can have fields of level up to that of the inductive.

Test result: 👍 accepted · exit code 0 · wall time: 101 ms · instructions: 574.2 M · max rss memory: 64.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 36 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/060_typeWithTypeFieldPoly"

Expected: 👍 accept · Size: 2.1 KB · Lines: 38 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive type can have fields of level up to that of the inductive (polymorphic variant).

Test result: 👍 accepted · exit code 0 · wall time: 117 ms · instructions: 596.6 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 38 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/061_typeWithTooHighTypeField.mk"

Expected: ✋ reject · Size: 943 B · Lines: 11 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive type can have fields of from higher universes.

Test result: ✋ rejected · exit code 1 · wall time: 113 ms · instructions: 603.1 M · max rss memory: 64.6 MB

stdout:
REJECTED inductive typeWithTooHighTypeField: universe level of type_of(arg #1) of 'typeWithTooHighTypeField.mk' is too big for the corresponding inductive datatype
lean 4.34.1, export format 3.1.0, 11 lines
checked 0 constants ({}) and 0 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/062_emptyRec"

Expected: 👍 accept · Size: 1.2 KB · Lines: 21 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 105 ms · instructions: 596.9 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 21 lines
checked 3 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/063_boolRec"

Expected: 👍 accept · Size: 3.0 KB · Lines: 53 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 120 ms · instructions: 597.4 M · max rss memory: 64.2 MB

stdout:
lean 4.34.1, export format 3.1.0, 53 lines
checked 5 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/064_twoBoolRec"

Expected: 👍 accept · Size: 4.8 KB · Lines: 78 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 118 ms · instructions: 613.7 M · max rss memory: 64.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 78 lines
checked 8 constants ({DEF=1}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/065_andRec"

Expected: 👍 accept · Size: 3.2 KB · Lines: 58 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 122 ms · instructions: 606.0 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 58 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/066_prodRec"

Expected: 👍 accept · Size: 4.0 KB · Lines: 79 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 614.9 M · max rss memory: 64.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 79 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/067_pprodRec"

Expected: 👍 accept · Size: 4.0 KB · Lines: 78 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 139 ms · instructions: 622.2 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 78 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/068_punitRec"

Expected: 👍 accept · Size: 2.2 KB · Lines: 39 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 607.8 M · max rss memory: 64.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 39 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/069_eqRec"

Expected: 👍 accept · Size: 3.3 KB · Lines: 63 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 604.0 M · max rss memory: 64.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 63 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/070_nRec"

Expected: 👍 accept · Size: 3.3 KB · Lines: 61 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 611.7 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 61 lines
checked 5 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/071_rbTreeRef"

Expected: 👍 accept · Size: 16.2 KB · Lines: 303 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor

Test result: 👍 accepted · exit code 0 · wall time: 115 ms · instructions: 742.7 M · max rss memory: 64.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 303 lines
checked 14 constants ({DEF=1}) and 3 inductive blocks in 0.05s
axioms declared: none
all declarations verified

Test "tutorial/072_boolPropRec"

Expected: 👍 accept · Size: 2.3 KB · Lines: 34 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Inductive predicates eliminate into Prop if they have more than one constructor.

Test result: 👍 accepted · exit code 0 · wall time: 91 ms · instructions: 579.7 M · max rss memory: 63.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 34 lines
checked 5 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/073_BogusRecursor"

Expected: ✋ reject · Size: 1.8 KB · Lines: 27 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A kernel must not blindly trust the recursors it is handed. If we write

inductive BogusRecursor : Type where
  | mk : BogusRecursor

then the recursor BogusRecursor.rec will be correctly derived with type {motive : BogusRecursor → Sort u} → motive .mk → (t : BogusRecursor) → motive t.

This test instead claims that the recursor is a constant of type False, and then uses it to prove bogusRecursorFalse : False. A kernel that validates the recursors it is handed rejects the bogus recursor itself; a kernel that ignores them and derives the recursors anew rejects the proof of False (the derived recursor neither has type False nor zero universe parameters). Either way, this test must be rejected.

Test result: ✋ rejected · exit code 1 · wall time: 98 ms · instructions: 615.1 M · max rss memory: 64.3 MB

stdout:
REJECTED inductive BogusRecursor: recursor BogusRecursor.rec has the wrong type
  expected: (? motive : (? t : BogusRecursor, Sort(u)), (? minor : (#0 BogusRecursor.mk), (? t : BogusRecursor, (#2 #0))))
  exported: False
lean 4.34.1, export format 3.1.0, 27 lines
checked 2 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/074_existsRec"

Expected: 👍 accept · Size: 3.6 KB · Lines: 66 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Inductive predicates eliminate into Prop if they have one constructors and it carries data.

Test result: 👍 accepted · exit code 0 · wall time: 110 ms · instructions: 587.8 M · max rss memory: 64.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 66 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/075_typeSingletonRecReduction"

Expected: 👍 accept · Size: 7.9 KB · Lines: 138 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Because NewSingleton is a singleton, NewSingleton.rec true x reduces to true even though x is a variable.

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 659.7 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 138 lines
checked 12 constants ({DEF=2}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/076_sortElimPropRec"

Expected: 👍 accept · Size: 5.6 KB · Lines: 97 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Inductive predicates eliminate into Sort if they have one constructors and it carries data, but the data is known from the type, e.g. a parameter or an index

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 621.4 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 97 lines
checked 8 constants ({DEF=1}) and 2 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/077_sortElimProp2Rec"

Expected: 👍 accept · Size: 6.6 KB · Lines: 114 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Inductive predicates eliminate into Sort if they have one constructors and it carries data, but the data is known from the type, e.g. a parameter or an index. However, it must occur directly in the result type, with no intervening reduction.

Test result: 👍 accepted · exit code 0 · wall time: 104 ms · instructions: 622.7 M · max rss memory: 64.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 114 lines
checked 9 constants ({DEF=2}) and 2 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/078_boolRecEqns"

Expected: 👍 accept · Size: 10.8 KB · Lines: 199 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of Bool.rec

Test result: 👍 accepted · exit code 0 · wall time: 111 ms · instructions: 657.6 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 199 lines
checked 11 constants ({THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/079_prodRecEqns"

Expected: 👍 accept · Size: 10.1 KB · Lines: 205 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of Prod.rec

Test result: 👍 accepted · exit code 0 · wall time: 126 ms · instructions: 699.1 M · max rss memory: 64.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 205 lines
checked 7 constants ({THM=1}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/080_nRecReduction"

Expected: 👍 accept · Size: 12.7 KB · Lines: 238 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A proof relying on the reduction behavior of N.rec

Test result: 👍 accepted · exit code 0 · wall time: 91 ms · instructions: 704.4 M · max rss memory: 65.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 238 lines
checked 13 constants ({DEF=2, THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/081_listRecReduction"

Expected: 👍 accept · Size: 17.5 KB · Lines: 335 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of List.rec

Test result: 👍 accepted · exit code 0 · wall time: 108 ms · instructions: 756.0 M · max rss memory: 65.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 335 lines
checked 14 constants ({DEF=3, THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/082_RBTree.id_spec"

Expected: 👍 accept · Size: 47.9 KB · Lines: 1.0 k · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of RBTree.rec

Test result: 👍 accepted · exit code 0 · wall time: 120 ms · instructions: 1.0 G · max rss memory: 69.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 1006 lines
checked 19 constants ({DEF=2, THM=1}) and 4 inductive blocks in 0.05s
axioms declared: none
all declarations verified

Test "tutorial/083_And.right"

Expected: 👍 accept · Size: 4.3 KB · Lines: 74 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type-checking simple projection functions

Test result: 👍 accepted · exit code 0 · wall time: 96 ms · instructions: 605.1 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 74 lines
checked 5 constants ({THM=2}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/084_Prod.snd"

Expected: 👍 accept · Size: 4.5 KB · Lines: 83 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type-checking projection functions with parameters

Test result: 👍 accepted · exit code 0 · wall time: 91 ms · instructions: 625.0 M · max rss memory: 65.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 83 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/085_PProd.snd"

Expected: 👍 accept · Size: 4.5 KB · Lines: 83 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type-checking projection functions

Test result: 👍 accepted · exit code 0 · wall time: 92 ms · instructions: 628.9 M · max rss memory: 64.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 83 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/086_PSigma.snd"

Expected: 👍 accept · Size: 5.1 KB · Lines: 96 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type-checking dependent projection functions

Test result: 👍 accepted · exit code 0 · wall time: 97 ms · instructions: 627.4 M · max rss memory: 64.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 96 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/087_projOutOfRange"

Expected: ✋ reject · Size: 3.8 KB · Lines: 67 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Out of range projection

Test result: ✋ rejected · exit code 1 · wall time: 102 ms · instructions: 634.0 M · max rss memory: 64.4 MB

stdout:
REJECTED DEF projOutOfRange: invalid projection, index out of range: _f33.3
lean 4.34.1, export format 3.1.0, 67 lines
checked 3 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/088_projNotStruct"

Expected: ✋ reject · Size: 3.5 KB · Lines: 64 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projection out something that is not a structure

Test result: ✋ rejected · exit code 1 · wall time: 89 ms · instructions: 622.4 M · max rss memory: 64.6 MB

stdout:
REJECTED DEF projNotStruct: invalid projection, not a structure: N
lean 4.34.1, export format 3.1.0, 64 lines
checked 4 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/089_projProp1"

Expected: 👍 accept · Size: 8.2 KB · Lines: 143 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a proposition

The lean kernel allows projections out of propositions if they precede all dependent data fields.

Test result: 👍 accepted · exit code 0 · wall time: 93 ms · instructions: 656.2 M · max rss memory: 64.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 143 lines
checked 10 constants ({DEF=1}) and 3 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/090_projProp2"

Expected: ✋ reject · Size: 8.2 KB · Lines: 143 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a proposition

The lean kernel disallows data projections out of propositional structures.

Test result: ✋ rejected · exit code 1 · wall time: 102 ms · instructions: 668.9 M · max rss memory: 64.4 MB

stdout:
REJECTED DEF projProp2: invalid projection, structure is a proposition but field is not: _f58.2
lean 4.34.1, export format 3.1.0, 143 lines
checked 9 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/091_projProp3"

Expected: 👍 accept · Size: 8.2 KB · Lines: 143 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a proposition

The lean kernel allows projections out of propositions if they precede all dependent data fields. Non-dependent data fields are not relevant.

Test result: 👍 accepted · exit code 0 · wall time: 106 ms · instructions: 673.0 M · max rss memory: 65.1 MB

stdout:
lean 4.34.1, export format 3.1.0, 143 lines
checked 10 constants ({DEF=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/092_projProp4"

Expected: ✋ reject · Size: 8.2 KB · Lines: 143 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a proposition

The lean kernel disallows data projections out of propositional structures.

Test result: ✋ rejected · exit code 1 · wall time: 97 ms · instructions: 657.8 M · max rss memory: 65.1 MB

stdout:
REJECTED DEF projProp4: invalid projection, structure is a proposition but field is not: _f58.4
lean 4.34.1, export format 3.1.0, 143 lines
checked 9 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/093_projProp5"

Expected: ✋ reject · Size: 8.4 KB · Lines: 148 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a proposition

The lean kernel disallows proof projections out of propositional structures that depend on data.

Test result: ✋ rejected · exit code 1 · wall time: 98 ms · instructions: 679.6 M · max rss memory: 64.3 MB

stdout:
REJECTED DEF projProp5: invalid projection, structure is a proposition but field is not: _f57.4
lean 4.34.1, export format 3.1.0, 148 lines
checked 9 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/094_projProp6"

Expected: ✋ reject · Size: 8.2 KB · Lines: 143 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out of a proposition.

The lean kernel rejects any projections out of a proposition that come after a dependent data field, even if that is not used by the present projection.

Test result: ✋ rejected · exit code 1 · wall time: 99 ms · instructions: 665.4 M · max rss memory: 64.9 MB

stdout:
REJECTED DEF projProp6: invalid projection, structure is a proposition and a later field depends on a data field: _f58.6
lean 4.34.1, export format 3.1.0, 143 lines
checked 9 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/095_projDataIndexRec"

Expected: 👍 accept · Size: 6.8 KB · Lines: 111 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The recursor for ProjDataIndex allows elimination into sort.

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 629.2 M · max rss memory: 64.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 111 lines
checked 11 constants ({DEF=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/096_projIndexData"

Expected: ✋ reject · Size: 14.1 KB · Lines: 226 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out data is not allowed, even if this data appears as an index and the recursor would allow it.

Test result: ✋ rejected · exit code 1 · wall time: 92 ms · instructions: 686.9 M · max rss memory: 64.9 MB

stdout:
REJECTED DEF projIndexData: invalid projection, type name mismatch: _f87.1
lean 4.34.1, export format 3.1.0, 226 lines
checked 19 constants ({}) and 6 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/097_projIndexData2"

Expected: ✋ reject · Size: 14.1 KB · Lines: 226 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projecting out data is not allowed, even if this data appears as an index and the recursor would allow it.

This also forbids projecting out proofs that follow such fields.

Test result: ✋ rejected · exit code 1 · wall time: 98 ms · instructions: 739.7 M · max rss memory: 64.7 MB

stdout:
REJECTED DEF projIndexData2: invalid projection, type name mismatch: _f87.2
lean 4.34.1, export format 3.1.0, 226 lines
checked 19 constants ({}) and 6 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/098_projRed"

Expected: 👍 accept · Size: 9.9 KB · Lines: 177 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Projection reductions

Test result: 👍 accepted · exit code 0 · wall time: 106 ms · instructions: 680.9 M · max rss memory: 64.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 177 lines
checked 13 constants ({DEF=3}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/099_ruleK"

Expected: 👍 accept · Size: 6.5 KB · Lines: 121 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Rule k for Eq: The recursor reduces even if the major argument is not a constructor, as long replacing the major argument with a constructor is type correct.

Test result: 👍 accepted · exit code 0 · wall time: 106 ms · instructions: 618.7 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 121 lines
checked 8 constants ({THM=1}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/100_ruleKbad"

Expected: ✋ reject · Size: 6.5 KB · Lines: 121 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Rule k for Eq should not fire if the types of the major argument do not match that of the constructor.

Test result: ✋ rejected · exit code 1 · wall time: 100 ms · instructions: 681.7 M · max rss memory: 65.2 MB

stdout:
REJECTED THM ruleKbad: declaration type mismatch, ruleKbad
  value has type: (? x._@.Tutorial.3161876795._hygCtx._hyg.27 : (Eq.{[1]} Bool Bool.true Bool.false), (? a : Bool, (Eq.{[1]} Bool #0 #0)))
  but is expected to have type: (? h : (Eq.{[1]} Bool Bool.true Bool.false), (? a : Bool, (Eq.{[1]} Bool (Eq.rec.{[1, 1]} Bool Bool.true (fun x._@.Tutorial.3161876795._hygCtx._hyg.17 : Bool => (fun x._@.Tutorial.3161876795._hygCtx._hyg.19 : (Eq.{[1]} Bool Bool.true #0) => Bool)) #0 Bool.false #1) #0)))
lean 4.34.1, export format 3.1.0, 121 lines
checked 7 constants ({}) and 2 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/101_ruleKAcc"

Expected: ✋ reject · Size: 12.5 KB · Lines: 229 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Rule k should not fire for Acc.

Test result: ✋ rejected · exit code 1 · wall time: 106 ms · instructions: 727.7 M · max rss memory: 65.0 MB

stdout:
REJECTED THM ruleKAcc: declaration type mismatch, ruleKAcc
  value has type: (? ? : Sort(u), (? p : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? x : #1, (? h : (Acc.{[u]} #2 #1 #0), (? a : Bool, (Eq.{[1]} Bool #0 #0))))))
  but is expected to have type: (? ? : Sort(u), (? p : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? x : #1, (? h : (Acc.{[u]} #2 #1 #0), (? a : Bool, (Eq.{[1]} Bool (Acc.rec.{[1, u]} #4 #3 (fun x._@.Tutorial.4255978773._hygCtx._hyg.22 : #4 => (fun x._@.Tutorial.4255978773._hygCtx._hyg.24 : (Acc.{[u]} #5 #4 #0) => Bool)) (fun x._@.Tutorial.4255978773._hygCtx._hyg.31 : #4 => (fun x._@.Tutorial.4255978773._hygCtx._hyg.33 : (? y : #5, (? a._@._internal._hyg.0 : (#5 #0 #1), (Acc.{[u]} #7 #6 #1))) => (fun x._@.Tutorial.4255978773._hygCtx._hyg.35 : (? y : #6, (? a._@._internal._hyg.0 : (#6 #0 #2), Bool)) => #3))) #2 #1) #0))))))
lean 4.34.1, export format 3.1.0, 229 lines
checked 10 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/102_aNatLit"

Expected: 👍 accept · Size: 3.0 KB · Lines: 54 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Type checking Nat literals

Test result: 👍 accepted · exit code 0 · wall time: 96 ms · instructions: 598.2 M · max rss memory: 63.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 54 lines
checked 5 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/103_natLitEq"

Expected: 👍 accept · Size: 6.1 KB · Lines: 114 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reducing Nat literals

Test result: 👍 accepted · exit code 0 · wall time: 99 ms · instructions: 583.3 M · max rss memory: 63.7 MB

stdout:
lean 4.34.1, export format 3.1.0, 114 lines
checked 8 constants ({THM=1}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/104_proofIrrelevance"

Expected: 👍 accept · Size: 5.0 KB · Lines: 100 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof irrelevance: every Prop is a subsingleton, if p : Prop then all elements of p are definitionally equal.

Test result: 👍 accepted · exit code 0 · wall time: 99 ms · instructions: 619.8 M · max rss memory: 64.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 100 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/105_proofIrrelevanceBad"

Expected: ✋ reject · Size: 4.7 KB · Lines: 93 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof irrelevance is limited to Prop: if p : Type, then all elements of p are not definitionally equal.

Test result: ✋ rejected · exit code 1 · wall time: 100 ms · instructions: 647.5 M · max rss memory: 64.4 MB

stdout:
REJECTED DEF proofIrrelevanceBad: declaration type mismatch, proofIrrelevanceBad
  value has type: (? p : Sort(1), (? h1 : #0, (? h2 : #1, (Eq.{[1]} #2 #1 #1))))
  but is expected to have type: (? p : Sort(1), (? h1 : #0, (? h2 : #1, (Eq.{[1]} #2 #1 #0))))
lean 4.34.1, export format 3.1.0, 93 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/106_proofIrrelevanceWhnf"

Expected: 👍 accept · Size: 5.6 KB · Lines: 112 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof irrelevance: if p : A and A is definitionally equal to Prop, then all elements of p are still definitionally equal. Just applying proof irrelevance at Sort 0 isn't sufficient.

Test result: 👍 accepted · exit code 0 · wall time: 91 ms · instructions: 613.8 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 112 lines
checked 6 constants ({DEF=3}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/107_proofIrrelevanceUnderBinder"

Expected: 👍 accept · Size: 1.9 KB · Lines: 39 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Proof irrelevance applies to any two terms of a proposition, not just to variables. Checking this definition needs aPropFamily (h anElem) ≡ aPropFamily (h anotherElem), i.e. h anElem ≡ h anotherElem. Both are proofs of aProp, since h : aType → aProp, so they are definitionally equal even though their arguments are not. A checker that compares the two applications structurally, without first noticing that they are proofs, wrongly rejects this.

Test result: 👍 accepted · exit code 0 · wall time: 87 ms · instructions: 564.3 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 39 lines
checked 7 constants ({AXIOM=6, DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: aType, aProp, aPropFamily, anElem, anotherElem, aPropFamilyProof
all declarations verified

Test "tutorial/108_unitEta1"

Expected: 👍 accept · Size: 6.2 KB · Lines: 116 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit eta

Test result: 👍 accepted · exit code 0 · wall time: 103 ms · instructions: 636.0 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 116 lines
checked 9 constants ({DEF=3}) and 2 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/109_unitEta2"

Expected: 👍 accept · Size: 5.9 KB · Lines: 109 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit eta

Test result: 👍 accepted · exit code 0 · wall time: 101 ms · instructions: 643.4 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 109 lines
checked 8 constants ({DEF=2}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/110_unitEta3"

Expected: 👍 accept · Size: 6.0 KB · Lines: 111 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unit eta

Test result: 👍 accepted · exit code 0 · wall time: 101 ms · instructions: 604.5 M · max rss memory: 64.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 111 lines
checked 8 constants ({DEF=2}) and 2 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/111_indexedUnitEta"

Expected: ✋ reject · Size: 7.2 KB · Lines: 121 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The unit-like rule, which makes any two elements of a single-constructor type with no fields definitionally equal, is also restricted to non-recursive structures without indices (is_def_eq_unit_like goes through is_non_rec_structure), so it does not fire for IndexedUnit.

Test result: ✋ rejected · exit code 1 · wall time: 108 ms · instructions: 685.3 M · max rss memory: 65.1 MB

stdout:
REJECTED DEF indexedUnitEta: declaration type mismatch, indexedUnitEta
  value has type: (? x : (IndexedUnit Bool.true), (? y : (IndexedUnit Bool.true), (Eq.{[1]} (IndexedUnit Bool.true) #1 #1)))
  but is expected to have type: (? x : (IndexedUnit Bool.true), (? y : (IndexedUnit Bool.true), (Eq.{[1]} (IndexedUnit Bool.true) #1 #0)))
lean 4.34.1, export format 3.1.0, 121 lines
checked 10 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/112_structEta"

Expected: 👍 accept · Size: 12.5 KB · Lines: 230 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Structure eta

Test result: 👍 accepted · exit code 0 · wall time: 103 ms · instructions: 723.8 M · max rss memory: 65.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 230 lines
checked 13 constants ({DEF=4}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/113_indexedStructEta"

Expected: ✋ reject · Size: 8.5 KB · Lines: 138 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Structure eta applies only to non-recursive structures without indices: the official kernel's is_non_rec_structure requires nindices == 0, so it does not fire for IndexedSingleton even though that has a single constructor.

Every field of IndexedSingleton.mk is a proof, so a kernel that checks only "has a single constructor" and then compares the fields against projections would have proof irrelevance discharge the remaining goals, and would wrongly accept this.

Test result: ✋ rejected · exit code 1 · wall time: 99 ms · instructions: 702.2 M · max rss memory: 65.1 MB

stdout:
REJECTED DEF indexedStructEta: declaration type mismatch, indexedStructEta
  value has type: (? a : (IndexedSingleton Bool.true), (Eq.{[1]} (IndexedSingleton Bool.true) #0 #0))
  but is expected to have type: (? x : (IndexedSingleton Bool.true), (Eq.{[1]} (IndexedSingleton Bool.true) (IndexedSingleton.mk True.intro) #0))
lean 4.34.1, export format 3.1.0, 138 lines
checked 13 constants ({}) and 4 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/114_funEta"

Expected: 👍 accept · Size: 5.2 KB · Lines: 104 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Function eta for non-dependent functions.

Test result: 👍 accepted · exit code 0 · wall time: 90 ms · instructions: 612.6 M · max rss memory: 63.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 104 lines
checked 5 constants ({DEF=1, THM=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/115_funEtaDep"

Expected: 👍 accept · Size: 5.3 KB · Lines: 106 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Function eta for dependent functions (pi types).

Test result: 👍 accepted · exit code 0 · wall time: 90 ms · instructions: 606.3 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 106 lines
checked 5 constants ({DEF=1, THM=1}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/116_funEtaBad"

Expected: ✋ reject · Size: 4.9 KB · Lines: 97 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Eta should not identify functions with different bodies.

Test result: ✋ rejected · exit code 1 · wall time: 92 ms · instructions: 648.3 M · max rss memory: 64.9 MB

stdout:
REJECTED THM funEtaBad: declaration type mismatch, funEtaBad
  value has type: (? x._@.Tutorial.4249243883._hygCtx._hyg.28 : Sort(1), (? x._@.Tutorial.4249243883._hygCtx._hyg.30 : Sort(1), (? x._@.Tutorial.4249243883._hygCtx._hyg.32 : (? a._@._internal._hyg.0 : #1, #2), (? f : (? a._@._internal._hyg.0 : #2, #2), (Eq.{[1]} (? x : #3, #3) #0 #0)))))
  but is expected to have type: (? ? : Sort(1), (? ? : Sort(1), (? g : (? a._@._internal._hyg.0 : #1, #2), (? f : (? a._@._internal._hyg.0 : #2, #2), (Eq.{[1]} (? x : #3, #3) (fun x : #3 => (#1 (#2 #0))) #0)))))
lean 4.34.1, export format 3.1.0, 97 lines
checked 3 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/117_reflOccLeft"

Expected: ✋ reject · Size: 3.7 KB · Lines: 61 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Rejection: recursive occurrence on the left of an arrow, behind further arrows inside a constructor argument.

The constructor argument is a function type Nat → (I → Nat).

Test result: ✋ rejected · exit code 1 · wall time: 96 ms · instructions: 633.2 M · max rss memory: 65.1 MB

stdout:
REJECTED inductive reflOccLeft: arg #1 of 'reflOccLeft.mk' has a non positive occurrence of the datatypes being declared
lean 4.34.1, export format 3.1.0, 61 lines
checked 4 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/118_reflOccInIndex"

Expected: ✋ reject · Size: 3.9 KB · Lines: 66 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Rejection: recursive occurrence in index position, behind a further arrow.

We build an indexed inductive I : Type → Type with a constructor argument Nat → I (I α), so the recursive occurrence appears as an index argument.

Test result: ✋ rejected · exit code 1 · wall time: 97 ms · instructions: 629.0 M · max rss memory: 64.9 MB

stdout:
REJECTED inductive reflOccInIndex: application type mismatch
  function head: reflOccInIndex
  argument: _f13
  has type: Nat
  but is expected to have type: Sort(1)
lean 4.34.1, export format 3.1.0, 66 lines
checked 4 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/119_reduceCtorParamRefl.mk"

Expected: 👍 accept · Size: 4.5 KB · Lines: 88 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

When checking inductives, we expect the kernel to reduce the types of constructor arguments in all positive positions.

Test result: 👍 accepted · exit code 0 · wall time: 123 ms · instructions: 595.0 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 88 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.05s
axioms declared: none
all declarations verified

Test "tutorial/120_reduceCtorParamRefl2.mk"

Expected: 👍 accept · Size: 4.5 KB · Lines: 88 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

When checking inductives, we expect the kernel to reduce the types of constructor arguments in all positive positions.

Test result: 👍 accepted · exit code 0 · wall time: 93 ms · instructions: 597.2 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 88 lines
checked 5 constants ({DEF=2}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/121_rTreeRec"

Expected: 👍 accept · Size: 5.5 KB · Lines: 91 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of the generated recursor.

Test result: 👍 accepted · exit code 0 · wall time: 92 ms · instructions: 622.9 M · max rss memory: 64.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 91 lines
checked 9 constants ({DEF=1}) and 2 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/122_rtreeRecReduction"

Expected: 👍 accept · Size: 10.7 KB · Lines: 191 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of RTree.rec on RTree.mk.

Test result: 👍 accepted · exit code 0 · wall time: 102 ms · instructions: 671.7 M · max rss memory: 64.8 MB

stdout:
lean 4.34.1, export format 3.1.0, 191 lines
checked 14 constants ({DEF=2, THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/123_accRecType"

Expected: 👍 accept · Size: 7.5 KB · Lines: 151 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of Acc.rec.

Test result: 👍 accepted · exit code 0 · wall time: 97 ms · instructions: 665.7 M · max rss memory: 64.9 MB

stdout:
lean 4.34.1, export format 3.1.0, 151 lines
checked 4 constants ({DEF=1}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/124_accRecReduction"

Expected: 👍 accept · Size: 13.0 KB · Lines: 243 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Acc.rec reduces on Acc.intro.

Test result: 👍 accepted · exit code 0 · wall time: 104 ms · instructions: 742.7 M · max rss memory: 65.0 MB

stdout:
lean 4.34.1, export format 3.1.0, 243 lines
checked 11 constants ({THM=1}) and 3 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/125_accRecNoEta"

Expected: ✋ reject · Size: 12.7 KB · Lines: 235 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Acc.rec does not have structure eta.

Test result: ✋ rejected · exit code 1 · wall time: 107 ms · instructions: 771.7 M · max rss memory: 65.5 MB

stdout:
REJECTED THM accRecNoEta: declaration type mismatch, accRecNoEta
  value has type: (? ? : Sort(1), (? r : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? a : #1, (? h : (Acc.{[1]} #2 #1 #0), (? a : Bool, (Eq.{[1]} Bool #0 #0))))))
  but is expected to have type: (? ? : Sort(1), (? r : (? a._@._internal._hyg.0 : #0, (? a._@._internal._hyg.0 : #1, Sort(0))), (? a : #1, (? h : (Acc.{[1]} #2 #1 #0), (? p : Bool, (Eq.{[1]} Bool (Acc.rec.{[1, 1]} #4 #3 (fun x._@.Tutorial.4017164079._hygCtx._hyg.22 : #4 => (fun x._@.Tutorial.4017164079._hygCtx._hyg.24 : (Acc.{[1]} #5 #4 #0) => Bool)) (fun x._@.Tutorial.4017164079._hygCtx._hyg.31 : #4 => (fun x._@.Tutorial.4017164079._hygCtx._hyg.33 : (? y : #5, (? a._@._internal._hyg.0 : (#5 #0 #1), (Acc.{[1]} #7 #6 #1))) => (fun x._@.Tutorial.4017164079._hygCtx._hyg.35 : (? y : #6, (? a._@._internal._hyg.0 : (#6 #0 #2), Bool)) => #3))) #2 #1) #0))))))
lean 4.34.1, export format 3.1.0, 235 lines
checked 10 constants ({}) and 3 inductive blocks in 0.04s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/126_quotMkType"

Expected: 👍 accept · Size: 6.3 KB · Lines: 123 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of Quot.mk.

Test result: 👍 accepted · exit code 0 · wall time: 114 ms · instructions: 625.8 M · max rss memory: 64.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 123 lines
checked 8 constants ({DEF=1, QUOT=4}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/127_quotIndType"

Expected: 👍 accept · Size: 6.3 KB · Lines: 124 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of Quot.ind.

Test result: 👍 accepted · exit code 0 · wall time: 97 ms · instructions: 623.6 M · max rss memory: 64.5 MB

stdout:
lean 4.34.1, export format 3.1.0, 124 lines
checked 8 constants ({DEF=1, QUOT=4}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/128_quotLiftType"

Expected: 👍 accept · Size: 6.3 KB · Lines: 124 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of Quot.lift.

Test result: 👍 accepted · exit code 0 · wall time: 117 ms · instructions: 625.8 M · max rss memory: 64.3 MB

stdout:
lean 4.34.1, export format 3.1.0, 124 lines
checked 8 constants ({DEF=1, QUOT=4}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/129_quotSoundType"

Expected: 👍 accept · Size: 7.2 KB · Lines: 141 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Asserting the type of Quot.sound.

Test result: 👍 accepted · exit code 0 · wall time: 95 ms · instructions: 643.4 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 141 lines
checked 9 constants ({AXIOM=1, DEF=1, QUOT=4}) and 1 inductive blocks in 0.03s
axioms declared: Quot.sound
all declarations verified

Test "tutorial/130_quotLiftReduction"

Expected: 👍 accept · Size: 7.8 KB · Lines: 153 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of Quot.lift on Quot.mk.

Test result: 👍 accepted · exit code 0 · wall time: 95 ms · instructions: 657.7 M · max rss memory: 64.6 MB

stdout:
lean 4.34.1, export format 3.1.0, 153 lines
checked 8 constants ({THM=1, QUOT=4}) and 1 inductive blocks in 0.04s
axioms declared: none
all declarations verified

Test "tutorial/131_quotIndReduction"

Expected: 👍 accept · Size: 7.6 KB · Lines: 151 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Reduction behavior of Quot.ind on Quot.mk.

Test result: 👍 accepted · exit code 0 · wall time: 106 ms · instructions: 645.1 M · max rss memory: 64.4 MB

stdout:
lean 4.34.1, export format 3.1.0, 151 lines
checked 8 constants ({THM=1, QUOT=4}) and 1 inductive blocks in 0.03s
axioms declared: none
all declarations verified

Test "tutorial/132_dup_defs"

Expected: ✋ reject · Size: 475 B · Lines: 7 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Two definitions with the same name

Test result: ✋ rejected · exit code 1 · wall time: 86 ms · instructions: 556.5 M · max rss memory: 63.5 MB

stdout:
REJECTED DEF dup_defs: already declared: dup_defs
lean 4.34.1, export format 3.1.0, 7 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.02s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/133_dup_ind_def"

Expected: ✋ reject · Size: 1.7 KB · Lines: 27 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A definition and a constructor with the same name

Test result: ✋ rejected · exit code 1 · wall time: 91 ms · instructions: 591.2 M · max rss memory: 64.3 MB

stdout:
REJECTED inductive dup_ind_def: already declared: dup_ind_def
lean 4.34.1, export format 3.1.0, 27 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/134_dup_ctor_def"

Expected: ✋ reject · Size: 1.7 KB · Lines: 27 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A definition and a constructor with the same name

Test result: ✋ rejected · exit code 1 · wall time: 89 ms · instructions: 554.3 M · max rss memory: 63.9 MB

stdout:
REJECTED inductive dup_ctor_def: already declared: dup_ctor_def.mk
lean 4.34.1, export format 3.1.0, 27 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/135_dup_rec_def"

Expected: ✋ reject · Size: 1.7 KB · Lines: 27 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A definition and a recursor with the same name

Test result: ✋ rejected · exit code 1 · wall time: 96 ms · instructions: 604.4 M · max rss memory: 64.2 MB

stdout:
REJECTED inductive dup_rec_def: already declared: dup_rec_def.rec
lean 4.34.1, export format 3.1.0, 27 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/136_misnamed_rec_user"

Expected: ✋ reject · Size: 2.0 KB · Lines: 33 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

The name of the recursor for misnamed_rec must be misnamed_rec.rec: another name (like misnamed_rec.not_rec) should be rejected. dupRecUser is included so that checkers that recreate the recursor (as misnamed_rec.rec) rather than validating it still fail, because misnamed_rec_user references misnamed_rec.not_rec.

Test result: ✋ rejected · exit code 1 · wall time: 95 ms · instructions: 596.4 M · max rss memory: 64.2 MB

stdout:
REJECTED inductive misnamed_rec: missing recursor misnamed_rec.rec
lean 4.34.1, export format 3.1.0, 33 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/137_dup_rec_def2"

Expected: ✋ reject · Size: 1.7 KB · Lines: 28 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Even if a kernel doesn't catch a recursor for dup_rec_def2 that is misnamed as dup_rec_def2.not_rec, it should catch some other constant being given the name dup_rec_def2.rec that is reserved for the recursor.

Test result: ✋ rejected · exit code 1 · wall time: 96 ms · instructions: 607.5 M · max rss memory: 65.1 MB

stdout:
REJECTED inductive dup_rec_def2: already declared: dup_rec_def2.rec
lean 4.34.1, export format 3.1.0, 28 lines
checked 1 constants ({DEF=1}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/138_dup_ctor_rec"

Expected: ✋ reject · Size: 1.5 KB · Lines: 24 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

A constructor and a recursor with the same name

Test result: ✋ rejected · exit code 1 · wall time: 89 ms · instructions: 589.4 M · max rss memory: 64.5 MB

stdout:
REJECTED inductive dup_ctor_rec: already declared: dup_ctor_rec.rec
lean 4.34.1, export format 3.1.0, 24 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/139_DupConCon"

Expected: ✋ reject · Size: 2.2 KB · Lines: 34 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

An inductive with two constructors with the same name

Test result: ✋ rejected · exit code 1 · wall time: 87 ms · instructions: 582.4 M · max rss memory: 64.1 MB

stdout:
REJECTED inductive DupConCon: already declared: dup_ind_con_con.mk
lean 4.34.1, export format 3.1.0, 34 lines
checked 0 constants ({}) and 0 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/140_falseFromUnsafe"

Expected: ✋ reject · Size: 1.3 KB · Lines: 22 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Unsafe definitions cannot be used in theorems

Test result: ✋ rejected · exit code 1 · wall time: 96 ms · instructions: 606.6 M · max rss memory: 64.2 MB

stdout:
REJECTED THM falseFromUnsafe: invalid declaration, it uses unsafe declaration unsafeLoop
lean 4.34.1, export format 3.1.0, 22 lines
checked 3 constants ({DEF=1}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected

Test "tutorial/141_falseFromPartial"

Expected: ✋ reject · Size: 1.3 KB · Lines: 22 · lean4export: 3.1.0 · Lean: 4.34.1 · 📄 Declaration · 🔗 Source

Partial definitions cannot be used in theorems

Test result: ✋ rejected · exit code 1 · wall time: 92 ms · instructions: 602.2 M · max rss memory: 64.4 MB

stdout:
REJECTED DEF partialLoop: unknown constant partialLoop
lean 4.34.1, export format 3.1.0, 22 lines
checked 2 constants ({}) and 1 inductive blocks in 0.03s
axioms declared: none
1 declaration(s) rejected