blob: 67c4f85d5c03927c7adf5a6a19e8219e08600c37 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
Require Import ZArith.
Check 32%Z.
Check (eq_refl : 0x2a%Z = 42%Z).
Check (fun f : nat -> Z => (f 0%nat + 0)%Z).
Check (fun x : positive => Zpos (xO x)).
Check (fun x : positive => (Zpos x + 1)%Z).
Check (fun x : positive => Zpos x).
Check (fun x : positive => Zneg (xO x)).
Check (fun x : positive => (Zpos (xO x) + 0)%Z).
Check (fun x : positive => (- Zpos (xO x))%Z).
Check (fun x : positive => (- Zpos (xO x) + 0)%Z).
Check (Z.of_nat 0 + 1)%Z.
Check (0 + Z.of_nat (0 + 0))%Z.
Check (Z.of_nat 0 = 0%Z).
(* Submitted by Pierre Casteran *)
Require Import Arith.
Check (0 + Z.of_nat 11)%Z.
(* Check hexadecimal printing *)
Definition to_num_int n := Number.IntHexadecimal (Z.to_hex_int n).
Number Notation Z Z.of_num_int to_num_int : Z_scope.
Check 42%Z.
Check (-42)%Z.
Check 0%Z.
|