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
--verdict: a lambda whose variable is used twice does not convert to the same lambda passed for an abstract function, under a stuck call #1189
$ bend twice.bend
ALL PROOFS CHECK
Use --verdict for mathematical validity.
$ bend twice.bend --verdict
SOME PROOFS FAIL
Sorry - this is a mismatch between the TypeScript implementation, and the formalized BendTT kernel. [...]
$ bend twice.bend -o twice.bendtt && bendtt twice.bendtt # kernel built by --verdict for 2.0.34
SOME PROOFS FAIL
In t:
expected: ((apply x0) λx1 => ({λ+x2 => ((Nat.add x2) x2) : ∀x2 : Nat -> Nat} x1))
observed: (code x0)
With a => Nat.add(a, 1n) in both places (the variable used once), both
commands print ALL PROOFS CHECK.
apply(m, _) is stuck on the abstract m, so the conversion compares the
two function arguments. In the emitted book, same states (apply x0 λx2 => (x1 x2)) == (code x0): its f is eta-expanded as a plain λx => f x, while code has λ+x1 => (Nat.add x1 x1) (the variable is used
twice). Instantiated at t, the kernel's expected side keeps the redex ({λ+x2 => … : ∀x2 : Nat -> Nat} x1) under the plain λ, and does not identify
it with code's λ+. bend2 does.
We met it proving that a do chain over Result returns only what it
checked: the continuation of a +x : A <- m binding is such a λ+, and an
inversion lemma for Result.bind takes the continuation as an abstract f. We worked around it with one inversion lemma per binding, stating the
continuation literally.
Activity
BendTT converts a λ+ as a λ: a q=2 binder says how a λ runs, not what…
BendTT converts a λ+ as a λ: a q=2 binder says how a λ runs, not what…