Skip to content

Commit

Permalink
Do not require all_algebra
Browse files Browse the repository at this point in the history
  • Loading branch information
vbgl committed Mar 21, 2024
1 parent 4f8db17 commit f42c6c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/word.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
(* SOFTWARE. *)

(* -------------------------------------------------------------------- *)
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.

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key Z to int_scope
Require Import word_ssrZ.

(* -------------------------------------------------------------------- *)
Set Implicit Arguments.
Expand Down Expand Up @@ -1083,8 +1083,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 @@ -1345,7 +1345,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
4 changes: 2 additions & 2 deletions src/word_ssrZ.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
(* SOFTWARE. *)

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

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.16.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.17.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.18.0-coq-8.18)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.19)

Hiding binding of key Z to int_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key N to nat_scope

Check warning on line 25 in src/word_ssrZ.v

View workflow job for this annotation

GitHub Actions / build (mathcomp/mathcomp:1.19.0-coq-8.18)

Hiding binding of key Z to int_scope

Set Implicit Arguments.
Unset Strict Implicit.
Expand Down

0 comments on commit f42c6c8

Please sign in to comment.