diff options
author | Rustan Leino <unknown> | 2013-03-22 10:30:27 -0700 |
---|---|---|
committer | Rustan Leino <unknown> | 2013-03-22 10:30:27 -0700 |
commit | 0c77817fae2b4743820c47634dfbe8fd9036a533 (patch) | |
tree | 6afadcd1be8ebd61d25779da7c44f0f8bd0d93d3 /Test/dafny1 | |
parent | d43bca5ff665e0e8a14776f04e2c46d97ad21dd8 (diff) |
Updated two test files.
Diffstat (limited to 'Test/dafny1')
-rw-r--r-- | Test/dafny1/Rippling.dfy | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Test/dafny1/Rippling.dfy b/Test/dafny1/Rippling.dfy index 835c3043..4aaa9a38 100644 --- a/Test/dafny1/Rippling.dfy +++ b/Test/dafny1/Rippling.dfy @@ -204,7 +204,7 @@ function insort(n: Nat, xs: List): List case Cons(y, ys) =>
if leq(n, y) == True
then Cons(n, Cons(y, ys))
- else Cons(y, ins(n, ys))
+ else Cons(y, insort(n, ys))
}
function ins(n: Nat, xs: List): List
@@ -397,11 +397,8 @@ ghost method P19() ghost method P20()
ensures forall xs :: len(sort(xs)) == len(xs);
{
- P15(); // use the statement of problem 15 as a lemma
- // ... and manually introduce a case distinction:
- assert forall ys ::
- sort(ys) == Nil ||
- exists z, zs :: sort(ys) == Cons(z, zs);
+ // the proof of this theorem requires a lemma about "insort"
+ assert forall x, xs :: len(insort(x, xs)) == Suc(len(xs));
}
ghost method P21()
|