Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt to coq/coq#18730 #88

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
adapt to coq/coq#18730
andres-erbsen committed Feb 28, 2024
commit f1bd8344597ddcbc0c669d21106f9dfad315aedd
14 changes: 7 additions & 7 deletions BigNumPrelude.v
Original file line number Diff line number Diff line change
@@ -148,11 +148,11 @@ Theorem Zmod_le_first: forall a b, 0 <= a -> 0 < b -> 0 <= a mod b <= a.
rewrite Zplus_mod; auto with zarith.
rewrite Zmod_small with (a := t); auto with zarith.
apply Zmod_small; auto with zarith.
split; auto with zarith.
assert (0 <= 2 ^a * r); auto with zarith.
apply Z.add_nonneg_nonneg; auto with zarith.
split; auto with zarith; try (
assert (0 <= 2 ^a * r); auto with zarith;
apply Z.add_nonneg_nonneg; auto with zarith;
match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end;
auto with zarith.
auto with zarith).
pattern (2 ^ b) at 2; replace (2 ^ b) with ((2 ^ b - 2 ^a) + 2 ^ a);
try ring.
apply Z.add_le_lt_mono; auto with zarith.
@@ -179,10 +179,10 @@ Theorem Zmod_le_first: forall a b, 0 <= a -> 0 < b -> 0 <= a mod b <= a.
rewrite Zmod_small with (a := t); auto with zarith.
apply Zmod_small; auto with zarith.
split; auto with zarith.
assert (0 <= 2 ^a * r); auto with zarith.
apply Z.add_nonneg_nonneg; auto with zarith.
assert (0 <= 2 ^a * r); auto with zarith; try (
apply Z.add_nonneg_nonneg; auto with zarith;
match goal with |- context [?X mod ?Y] => case (Z_mod_lt X Y) end;
auto with zarith.
auto with zarith).
pattern (2 ^ b) at 2;replace (2 ^ b) with ((2 ^ b - 2 ^a) + 2 ^ a); try ring.
apply Z.add_le_lt_mono; auto with zarith.
replace b with ((b - a) + a); try ring.
Loading