Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Andrej Dudenhefner
stdpp
Commits
5843163b
Commit
5843163b
authored
Apr 08, 2021
by
Robbert Krebbers
Browse files
Add TODO about `Z_mod_nonneg_nonneg`.
parent
0ce29e73
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/numbers.v
View file @
5843163b
...
...
@@ -1212,8 +1212,10 @@ Lemma rotate_nat_add_add_mod base offset len:
rotate_nat_add
base
offset
len
=
rotate_nat_add
(
Z
.
to_nat
(
base
`
mod
`
len
)%
Z
)
offset
len
.
Proof
.
unfold
rotate_nat_add
.
rewrite
!
Z2Nat
.
id
;
[
by
rewrite
Zplus_mod_idemp_l
|].
destruct
len
as
[|
i
]
;
[
rewrite
Zmod_0_r
|
apply
Z_mod_lt
]
;
lia
.
(* TODO: [Z_mod_nonneg_nonneg] once that's part of all supported Coq versions *)
unfold
rotate_nat_add
.
assert
(
0
≤
base
`
mod
`
len
)%
Z
.
{
destruct
len
as
[|
i
]
;
[
rewrite
Zmod_0_r
|
apply
Z_mod_lt
]
;
lia
.
}
by
rewrite
Z2Nat
.
id
,
Zplus_mod_idemp_l
.
Qed
.
Lemma
rotate_nat_add_alt
base
offset
len
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment