Skip to content

Commit

Permalink
chore: Restore a proof
Browse files Browse the repository at this point in the history
  • Loading branch information
RustanLeino committed Dec 25, 2024
1 parent 64374b3 commit afdec6b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Source/DafnyStandardLibraries/src/Std/Arithmetic/DivMod.dfy
Original file line number Diff line number Diff line change
Expand Up @@ -629,12 +629,15 @@ module Std.Arithmetic.DivMod {
}
}

lemma LemmaIndistinguishableQuotients(a: int, b: int, d: int)
lemma {:induction false} LemmaIndistinguishableQuotients(a: int, b: int, d: int)
requires 0 < d
requires 0 <= a - a % d <= b < a + d - a % d
ensures a / d == b / d
{
LemmaDivInductionAuto(d, a - b, ab => var u := ab + b; 0 <= u - u % d <= b < u + d - u % d ==> u / d == b / d);
var f := ab => var u := ab + b; 0 <= u - u % d <= b < u + d - u % d ==> u / d == b / d;
assert f(a - b) by {
LemmaDivInductionAuto(d, a - b, f);
}
}

lemma LemmaIndistinguishableQuotientsAuto()
Expand Down

0 comments on commit afdec6b

Please sign in to comment.