Should a checker reject a let type mismatch that disappears after substitution?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Dokumentation
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Bereich
- compilers, documentation
Rechercherichtung
Lies src/kernel/type_checker.cpp bei infer_let und den let-Reduktionszweig und prüfe anschließend format_ndjson.md sowie das verknüpfte Klarstellungspaket. Vergleiche den Kandidaten und die passende Kontrolle nur so, wie es im Issue beschrieben ist. Erledigt bedeutet, dass die Abnahmegarantie entschieden und in der geeigneten Formatdokumentation oder im Lean-Referenzmaterial festgehalten ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
We are preparing shared regression tests for external Lean checkers and want
to clarify what a checker is expected to validate when it reads an exported
declaration.
Consider this existing serialized declaration, shown here in readable notation:
def EcosystemCase : Sort 2 := let u : Sort 1 := Sort 1; u
The let contains a type mismatch: its value, Sort 1, has type Sort 2, but
its annotation says Sort 1.
If we first substitute the value for u (zeta reduction), the expression becomes:
def EcosystemCase : Sort 2 := Sort 1
That resulting declaration has matching types. The simplification has removed
the incorrect annotation.
Should a full external checker reject the original declaration because of
that mismatch, or is it permitted to simplify the let first and accept the
result? If the interface assumes that incoming expressions have already been
type-checked, could that assumption be stated explicitly instead?
This matters for shared tests: we need to know whether acceptance promises that
the supplied expression was checked, or that a permitted transformation of it
was checked. We are asking about that guarantee, not reporting a false theorem
or asking every reducer to repeat checks on already-validated expressions.
We found separate checking and reduction paths in Lean v4.33.0:
infer_let
checks the annotation/value relationship in checking mode, while the
let reduction branch
substitutes directly. The
3.1.0 format description
lists the let fields but does not state which acceptance guarantee applies.
Is there an existing policy we should cite, or would a short clarification in
that document or the Lean reference manual be appropriate?
For reproducibility, the unchanged candidate NDJSON
and matching control
are each 601 bytes. The notation above explains those bytes; it is not an
elaboration result or a new test run. The body uses u, and the control changes
both the let value and the enclosing declaration type. The
source review
records the exact versions and remaining qualifications.
- Vorherrschende Sprache
- Lean
- Sterne
- 52
- Forks
- 30
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus leanprover/lean4export
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
leanprover/lean4export#40 · 6 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 66/100
leanprover/lean4export#64 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 8/100
leanprover/lean4export#62 · 2 Kommentare ·
-
Exported binder names and binder info depend on what else is exportedEvtl. vergeben @JoAdo07 hat das vor 31 Tagen übernommen. Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 76/100
leanprover/lean4export#58 ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 25/100
leanprover/lean4export#8 · 2 Kommentare ·
Alle Issues in leanprover/lean4export
Ähnliche Issues
-
bug core-lang
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Call-argument syntax diagnostic needs example spacing and removal of confusing trailing sentenceOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
mw00/project-maya#1368 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
test(bind-json): legacy Solidity fixture requires an unavailable solc on Linux ARM64Evtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
foundry-rs/foundry#18828 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag