You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A spliced inline lambda applied to a rebuilt column emits an un-annotated beta-redex, so --verdict rejects what bend2 accepts #1175
BEND_NO_TELEMETRY=1 bend inl2b.bend --check-only, then --verdict
What happened
--check-only prints ALL PROOFS CHECK; --verdict fails with the TypeScript/kernel mismatch banner. The emitted BendTT contains an un-annotated beta-redex: a Kind-specialized parameter's inline-lambda value is spliced into the instance body and applied to a column-rebuilt tuple, emitting App(Lam, Tup) with no Ann around the lambda — the kernel's inference then fails with "expected an annotated term". When the same spliced lambda is applied to a plain variable instead, the kernel's bidirectional App-on-Var rule handles it and the file passes both gates.
Minimal shape (the erased -A: Kind(q1(f)) parameter forces f's field to specialize, splicing (y: Nat) => 1n into the body of run3's instance):
Emitted (the case 0n arm): (λx0 => (.Succ, ((.Zero, ()), ())) (.Zero, ())) — the lambda applied to the rebuilt tuple with no annotation, which the kernel rejects; the 1n+p arm's (λx0 => ...) x1 (variable argument) is accepted via the kernel's special App-on-Var rule.
Both gates agree on the trivial non-specialized variant, so this is specifically the spliced-lambda-at-non-Var-argument emission path.
Related divergence in the same splice machinery (fail-closed, same "Sorry" class as this one): at an erased (q0) specialized column, the splice path skips the η-demotion that the ordinary application path applies — the emitted instance keeps a live λ binder under an App q0 ((λx0 => 7n) -x1), so the kernel rejects "a λ of its binder's liveness" while the same lambda at a non-specialized call is demoted and passes. Minimal matrix: a def with a Kind-specialized param whose column value is an inline λ, called at a q0 argument vs a plain one — the q0 cell is check-only PASS / verdict FAIL, the plain cell is green.
Follow-up with the verbatim contrast pair for the η-demotion divergence above (both verified as-is on 2.0.32, 573002f):
The mismatch cell — a Kind-specialized param whose column value is an inline λ, called at an erased (@-y) domain. --check-only passes, --verdict fails with the mismatch banner, and the kernel rejects the emitted instance with "a λ of its binder's liveness":
So the splice path (spec_val) keeps the source binder quantity while the ordinary argument path (arg_term → eta) requantifies to the domain — the same lambda is live at one call site and demoted at the other. A dead-only-use variant (y => (-u = y; 7n)) behaves like the first file: check-only passes, verdict fails, kernel "a λ of its binder's liveness".
Reopening: 0187512 closed this by accident (its message says "fixes #1175's un-annotated head"). That commit fixes this issue's missing head annotation: run3.qv_ now emits ({λx1 => (.Succ, ((.Zero, ()), ())) : ∀x1 : Nat -> Nat} (.Zero, ())) and the kernel accepts it. But --verdict on the file still fails, because the generic root is out of scope: run3: a Quant that is not a literal. That part is still open.
Activity
yavuzerayut commentedon Sep 29, 2026
Related divergence in the same splice machinery (fail-closed, same "Sorry" class as this one): at an erased (q0) specialized column, the splice path skips the η-demotion that the ordinary application path applies — the emitted instance keeps a live λ binder under an
App q0((λx0 => 7n) -x1), so the kernel rejects "a λ of its binder's liveness" while the same lambda at a non-specialized call is demoted and passes. Minimal matrix: a def with a Kind-specialized param whose column value is an inlineλ, called at a q0 argument vs a plain one — the q0 cell is check-only PASS / verdict FAIL, the plain cell is green.yavuzerayut commentedon Sep 29, 2026
Follow-up with the verbatim contrast pair for the η-demotion divergence above (both verified as-is on 2.0.32, 573002f):
The mismatch cell — a Kind-specialized param whose column value is an inline
λ, called at an erased (@-y) domain.--check-onlypasses,--verdictfails with the mismatch banner, and the kernel rejects the emitted instance with "a λ of its binder's liveness":The green control — the same inline lambda at a NON-specialized call is η-demoted by the emitter (
λ-x0 => 5n) and passes everything:So the splice path (
spec_val) keeps the source binder quantity while the ordinary argument path (arg_term→eta) requantifies to the domain — the same lambda is live at one call site and demoted at the other. A dead-only-use variant (y => (-u = y; 7n)) behaves like the first file: check-only passes, verdict fails, kernel "a λ of its binder's liveness".nicolas-abril commentedon Sep 29, 2026
Reopening: 0187512 closed this by accident (its message says "fixes #1175's un-annotated head"). That commit fixes this issue's missing head annotation:
run3.qv_now emits({λx1 => (.Succ, ((.Zero, ()), ())) : ∀x1 : Nat -> Nat} (.Zero, ()))and the kernel accepts it. But--verdicton the file still fails, because the generic root is out of scope:run3: a Quant that is not a literal. That part is still open.A specialized argument goes to --verdict where it is used, at that de…
BendTT has the meet of quantities and a Σ of any kind, and --verdict …
A split root goes again at fresh constants, so sibling roots share no…
Shorter comments on the split root code (#1175)
A constant splits unless its field's declared type reaches its dataty…
Tighter comments on the split root code and its test (#1175)
A field that applies a parameter reaches what its argument names, an …
A root stuck on one of its constants goes to --verdict at each constr…
A split root goes again at fresh constants, so sibling roots share no…
Shorter comments on the split root code (#1175)
A constant splits unless its field's declared type reaches its dataty…
Tighter comments on the split root code and its test (#1175)
A field that applies a parameter reaches what its argument names, an …
BendTT has the meet of quantities and a Σ of any kind, and --verdict …
BendTT has the meet of quantities and a Σ of any kind, and --verdict …
BendTT has the meet of quantities and a Σ of any kind, and --verdict …
BendTT: kinds as quantity terms, meets, Σ at any kind and subsumption…