Commit 5843163b authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Add TODO about `Z_mod_nonneg_nonneg`.

parent 0ce29e73
...@@ -1212,8 +1212,10 @@ Lemma rotate_nat_add_add_mod base offset len: ...@@ -1212,8 +1212,10 @@ Lemma rotate_nat_add_add_mod base offset len:
rotate_nat_add base offset len = rotate_nat_add base offset len =
rotate_nat_add (Z.to_nat (base `mod` len)%Z) offset len. rotate_nat_add (Z.to_nat (base `mod` len)%Z) offset len.
Proof. Proof.
unfold rotate_nat_add. rewrite !Z2Nat.id; [by rewrite Zplus_mod_idemp_l|]. (* TODO: [Z_mod_nonneg_nonneg] once that's part of all supported Coq versions *)
destruct len as [|i]; [rewrite Zmod_0_r|apply Z_mod_lt]; lia. 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. Qed.
Lemma rotate_nat_add_alt base offset len: Lemma rotate_nat_add_alt base offset len:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment