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

Do not require all_algebra #29

Merged
merged 1 commit into from
Mar 21, 2024
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
12 changes: 6 additions & 6 deletions src/word.v
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@

(* -------------------------------------------------------------------- *)
From HB Require Import structures.
From mathcomp Require Import all_ssreflect all_algebra zmodp.
(* ------- *) Require Import Arith ZArith word_ssrZ.
Require Psatz.
From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint intdiv zmodp.
From Coq Require Import Arith ZArith Lia.
Require Import word_ssrZ.

(* -------------------------------------------------------------------- *)
Set Implicit Arguments.
Expand Down Expand Up @@ -1072,8 +1072,8 @@ have Hn : (0 < 2 ^ Z.of_nat n)%Z.
replace (-1 mod 2 ^ Z.of_nat n)%Z with (Z.ones (Z.of_nat n)); first last.
+ rewrite Z.ones_equiv; elim_div => ?; cut (z = -1)%Z; Lia.nia.
case: ssrnat.ltP => h.
+ apply: Z.ones_spec_low; Psatz.lia.
apply: Z.ones_spec_high; Psatz.lia.
+ apply: Z.ones_spec_low; lia.
apply: Z.ones_spec_high; lia.
Qed.

End WordLogicals.
Expand Down Expand Up @@ -1334,7 +1334,7 @@ move: {w w' s s' eq_size} (urepr w) (urepr w') (wcat_r s) (wcat_r s') (2%:R ^+ (
rewrite /GRing.zero /GRing.add /GRing.mul /=.
do 4 case/andP => /leZP ? /ltZP ?.
move => h.
cut (a = a'); Psatz.nia.
cut (a = a'); nia.
Qed.

Definition wcat {p} (s : p.-tuple n.-word) :=
Expand Down
2 changes: 1 addition & 1 deletion src/word_ssrZ.v
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

(* -------------------------------------------------------------------- *)
From HB Require Import structures.
From mathcomp Require Import all_ssreflect all_algebra.
From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint intdiv.
From Coq Require Import Arith ZArith.

Set Implicit Arguments.
Expand Down