diff options
author | Rustan Leino <leino@microsoft.com> | 2011-04-05 17:18:51 -0700 |
---|---|---|
committer | Rustan Leino <leino@microsoft.com> | 2011-04-05 17:18:51 -0700 |
commit | c382dec32aac64dfa50e999795841950e4d81fed (patch) | |
tree | c575441e7ec384941177a7a6c846e4f6a5f0a8f8 /Test/dafny1/Induction.dfy | |
parent | 343f29bee9cad726c2de33d4ef6cdb49caa965d2 (diff) | |
parent | e06dd62cbfe52cb75f358b22a98aadd12b52eb83 (diff) |
branch merge
Diffstat (limited to 'Test/dafny1/Induction.dfy')
-rw-r--r-- | Test/dafny1/Induction.dfy | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Test/dafny1/Induction.dfy b/Test/dafny1/Induction.dfy index f31d79f8..c3daad9e 100644 --- a/Test/dafny1/Induction.dfy +++ b/Test/dafny1/Induction.dfy @@ -119,12 +119,12 @@ class IntegerInduction { // possibility of applying induction. Instead, the "==>" and "<==" cases are given separately.
// Proving the "<==" case is simple; it's the "==>" case that requires induction.
// The example uses an attribute that requests induction on just "j". However, the proof also
- // goes through by applying induction just on "i" or applying induction on both bound variables.
+ // goes through by applying induction on both bound variables.
function method IsSorted(s: seq<int>): bool
ensures IsSorted(s) ==> (forall i,j {:induction j} :: 0 <= i && i < j && j < |s| ==> s[i] <= s[j]);
ensures (forall i,j :: 0 <= i && i < j && j < |s| ==> s[i] <= s[j]) ==> IsSorted(s);
{
- (forall i :: 0 <= i && i+1 < |s| ==> s[i] <= s[i+1])
+ (forall i :: 1 <= i && i < |s| ==> s[i-1] <= s[i])
}
}
|