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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
|
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).
Check 0x0%Z.
Check 0x00%Z.
Check 0x01%Z.
Check 0x02%Z.
Check 0xff%Z.
Check 0xFF%Z.
Check (-0x0)%Z.
Check (-0x00)%Z.
Check (-0x01)%Z.
Check (-0x02)%Z.
Check (-0xff)%Z.
Check (-0xFF)%Z.
Check 0x0%xZ.
Check 0x00%xZ.
Check 0x01%xZ.
Check 0x02%xZ.
Check 0xff%xZ.
Check 0xFF%xZ.
Check (-0x0)%xZ%Z.
Check (-0x00)%xZ%Z.
Check (-0x01)%xZ.
Check (-0x02)%xZ.
Check (-0xff)%xZ.
Check (-0xFF)%xZ.
(* Check hexadecimal printing *)
Open Scope hex_Z_scope.
Check 42%Z.
Check (-42)%Z.
Check 0%Z.
Check 42%xZ.
Check (-42)%xZ.
Check 0%xZ.
Check 0x0%Z.
Check 0x00%Z.
Check 0x01%Z.
Check 0x02%Z.
Check 0xff%Z.
Check 0xFF%Z.
Check (-0x0)%Z.
Check (-0x00)%Z.
Check (-0x01)%Z.
Check (-0x02)%Z.
Check (-0xff)%Z.
Check (-0xFF)%Z.
Check 0x0.
Check 0x00.
Check 0x01.
Check 0x02.
Check 0xff.
Check 0xFF.
Check 0x0%xZ.
Check 0x00%xZ.
Check 0x01%xZ.
Check 0x02%xZ.
Check 0xff%xZ.
Check 0xFF%xZ.
Check (-0x0)%xZ%Z.
Check (-0x00)%xZ%Z.
Check (-0x01)%xZ.
Check (-0x02)%xZ.
Check (-0xff)%xZ.
Check (-0xFF)%xZ.
Close Scope hex_Z_scope.
(* Submitted by Pierre Casteran *)
Require Import Arith.
Check (0 + Z.of_nat 11)%Z.
|