con-leche / con-ron accept a wrong `all` list on recursors and inductive types
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- security, testing-qa
Research direction
Start by reading the recursor and inductive declaration validation paths in con-leche and con-ron, then run the supplied Lean and Python repro scripts to generate the malformed exports. Check how each checker validates stored recursors and InductiveVal.all against the generated declarations. Done means both malformed files are rejected by con-leche and con-ron.
Written by the indexing model from the issue text.
Description
con-leche and con-ron accept exports where the all field of a recursor or of an inductive type is wrong. Every other kernel that lake check --paranoid runs rejects them.
I know the close of #15 said unused fields like a definition's all stay unread. I'm filing this anyway because the stored recursors are now compared with the generated ones (task #431), but their all field is not, and InductiveVal.all can even name a non-type (a constructor). Feel free to close if this is the same call.
Repro
-- Mut.lean
mutual
inductive A : Type
| base : A
| wrap : B → A
inductive B : Type
| mk : A → B
end
-- Foo.lean
universe u
inductive Foo (α : Sort u) : Sort (max 1 u) where
| mk : α → Foo α
lean Mut.lean -o Mut.olean && LEAN_PATH=$(lean --print-libdir):. leanexport Mut -- A B > mut.ndjson
lean Foo.lean -o Foo.olean && LEAN_PATH=$(lean --print-libdir):. leanexport Foo -- Foo > foo.ndjson
python3 recall.py mut.ndjson > rec-all.ndjson
python3 indall.py foo.ndjson > ind-all.ndjson
con-leche rec-all.ndjson; con-leche ind-all.ndjson
recall.py:
import json, sys
# first recursor of the mutual block A/B (B.rec): drop B from its `all` ([A, B] -> [A])
L = open(sys.argv[1]).read().splitlines()
for i, l in enumerate(L):
o = json.loads(l)
if "inductive" in o:
r = o["inductive"]["recs"][0]
r["all"] = r["all"][:1]
L[i] = json.dumps(o)
print("\n".join(L))
indall.py:
import json, sys
# InductiveVal.all of Foo gets an extra name (Foo.mk, which is not a type)
L = open(sys.argv[1]).read().splitlines()
for i, l in enumerate(L):
o = json.loads(l)
if "inductive" in o:
t = o["inductive"]["types"][0]
t["all"] = t["all"] + [o["inductive"]["ctors"][0]["name"]]
L[i] = json.dumps(o)
print("\n".join(L))
Result
| file | leanchecker | paranoid | lean4lean | nanoda | con-leche | con-ron |
|---|---|---|---|---|---|---|
| rec-all (nightly) | reject | reject | reject | reject | accept | accept |
| ind-all (nightly) | reject | reject | reject | reject | accept | accept |
- leanchecker:
Invalid recursor B.rec/'Foo.mk', listed in theallfield of 'Foo', is not a stored inductive type - con-leche:
accepted 1 declarations (--verified)
Same on v4.36.0 (there nanoda crashes instead of rejecting). con-ron 62cd8ab (current master) also accepts.
Impact
No contradiction found. con-* rebuild the block from the types and constructors, so the wrong list has no effect inside con-*. It is just a disagreement between the kernels on the same file; --paranoid still rejects because of the others.
Versions: bundled checkers of Lean v4.36.0 and nightly-2026-11-26.
- Dominant language
- Lean
- Stars
- 212
- Forks
- 19
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from leanprover/con-leche
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
leanprover/con-leche#25 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 27/100
leanprover/con-leche#21 · 1 comment ·
-
Stack overflow on master (con-leche and con-ron) on a 184 MB export that leanchecker --fresh acceptsOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
leanprover/con-leche#17 ·
All issues in leanprover/con-leche
Similar issues
-
security-advisory
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MinBZK/regelrecht#2173 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
accepted
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
future-agi/future-agi#6386 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
KevinSaison/fuchikoma#14 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
microlinkhq/metascraper#903 ·
Maintainers usually reply within 1 day