Skip to content

Commit 2131f25

Browse files
committed
Move some declarations
1 parent 1778402 commit 2131f25

File tree

2 files changed

+18
-17
lines changed

2 files changed

+18
-17
lines changed

theories/ssrZ.v

+14-17
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ HB.instance Definition _ (V : nmodType) (x : V) :=
5353
#[export]
5454
HB.instance Definition _ (R : semiRingType) :=
5555
GRing.isMultiplicative.Build nat R (GRing.natmul 1) (natrM R, mulr1n 1).
56+
57+
Fact Posz_is_semi_additive : semi_additive Posz.
58+
Proof. by []. Qed.
59+
60+
#[export]
61+
HB.instance Definition _ := GRing.isSemiAdditive.Build nat int Posz
62+
Posz_is_semi_additive.
63+
64+
Fact Posz_is_multiplicative : multiplicative Posz.
65+
Proof. by []. Qed.
66+
67+
#[export]
68+
HB.instance Definition _ := GRing.isMultiplicative.Build nat int Posz
69+
Posz_is_multiplicative.
5670
(* end *)
5771

5872
#[export]
@@ -219,25 +233,8 @@ Proof. by split => // m n; rewrite /GRing.mul /=; lia. Qed.
219233
HB.instance Definition _ := GRing.isMultiplicative.Build N Z Z.of_N
220234
Z_of_N_is_multiplicative.
221235

222-
Fact Posz_is_semi_additive : semi_additive Posz.
223-
Proof. by []. Qed.
224-
225-
#[export]
226-
HB.instance Definition _ := GRing.isSemiAdditive.Build nat int Posz
227-
Posz_is_semi_additive.
228-
229-
Fact Posz_is_multiplicative : multiplicative Posz.
230-
Proof. by []. Qed.
231-
232-
#[export]
233-
HB.instance Definition _ := GRing.isMultiplicative.Build nat int Posz
234-
Posz_is_multiplicative.
235-
236236
Module Exports. HB.reexport. End Exports.
237237

238238
End Instances.
239239

240240
Export Instances.Exports.
241-
242-
Lemma natn n : n%:R%R = n :> nat.
243-
Proof. by elim: n => // n; rewrite mulrS => ->. Qed.

theories/zify_algebra.v

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ Local Delimit Scope Z_scope with Z.
1717

1818
Import Order.Theory GRing.Theory Num.Theory SsreflectZifyInstances.
1919

20+
(* TODO: remove natn below when we drop support for MathComp 2.0 *)
21+
Local Lemma natn n : n%:R%R = n :> nat.
22+
Proof. by elim: n => // n; rewrite mulrS => ->. Qed.
23+
2024
(******************************************************************************)
2125
(* nat *)
2226
(******************************************************************************)

0 commit comments

Comments
 (0)