Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions doc/changelog/01-changed/258-bits-skipn-app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- in `theories/Zmod/Bits.v`

+ Fixed lemma `bits.skipn_app` to actually describe the interaction between
the titular functions. Developments relying on the previous tautological
statement can resore it by adding that version of the lemma to the codebase
(`#258 <https://github.com/coq/stdlib/pull/258>`_,
by Andres Erbsen).
6 changes: 3 additions & 3 deletions theories/Zmod/Bits.v
Original file line number Diff line number Diff line change
Expand Up @@ -415,11 +415,11 @@ Proof.
Qed.

Lemma skipn_app [n m] a b (Hn : 0 <= n) (Hm : 0 <= m) :
skipn n (@app n m a b) = of_Z _ (to_Z (skipn n (@app n m a b))).
skipn n (@app n m a b) = of_Z _ (to_Z b).
Proof.
case (skipn_app_ex a b) as [?->]; trivial.
apply to_Z_inj; rewrite to_Z_eq_rect, to_Z_of_Z.
rewrite Z.add_simpl_l, mod_to_Z; trivial.
apply to_Z_inj. rewrite to_Z_eq_rect, to_Z_of_Z.
pose proof unsigned_range b. rewrite Z.mod_small; lia.
Qed.

Lemma app_assoc_dep [n m l] (a : bits n) (b : bits m) (c : bits l)
Expand Down
Loading