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
-o/--verdict leave out a def that copies a hypothesis of computed type after a match refined it ("a λ that uses a variable twice") (2.0.35) #1349
$ bend copy.bend
ALL PROOFS CHECK
$ bend copy.bend -o copy.bendtt
BendTT: out of scope, so not in copy.bendtt:
- duplicate: a λ that uses a variable twice, of a type whose fields are not Data (a ~ argument)
$ bend copy.bend --verdict
SOME PROOFS FAIL
Sorry - this is a mismatch between the TypeScript implementation, and the formalized BendTT kernel. …
What happened
bend2 accepts duplicate: in the SpineEnd{} arm the type of proof is the
equality {Nat.is_le(b, 7n) == True{} : Bool}, which may be copied. The
translation sees the declared type AtEnd(rest, b), which does not reduce
to a datatype while rest is a variable, and leaves the def out.
Two controls pass both checkers: the same arm calling a helper pairProof(+b: Nat, +proof: {Nat.is_le(b, 7n) == True{} : Bool}) that returns (proof, proof); and a hypothesis of computed type consumed once in each
arm, without a copy (whether the match refines its type or not).
What you expected
The kernel checking duplicate, the copy being rebuilt at the type the
match refined it to (an equality, which is data); or, failing that, the
limitation listed in WONTFIX.txt, since --verdict alone only prints the
generic mismatch notice.
Activity