Why can't Dafny verify certain easy set cardinality and relational propositions?
问题 Here's a simple Dafny program: two line of code and three assertions. method Main() { var S := set s: int | 0 <= s < 50 :: 2 * s; var T := set t | t in S && t < 25; assert |S| == 50; // does not verify assert T <= S; // does verify assert T < S; // does not verify } The cardinality of S is 50, but Dafny can't verify this claim, as written. Similarly, T is obviously a subset of S, and Dafny can verify this claim; but T is also a proper subset of S, and Dafny cannot verify this claim. What is