aboutsummaryrefslogtreecommitdiff
path: root/theories/Init
diff options
context:
space:
mode:
authorPierre Roux2020-10-28 10:32:58 +0100
committerPierre Roux2020-11-05 00:20:53 +0100
commit36ac26532028bfc6f84e4dfc849b51f42a3d8286 (patch)
tree9a8057cf3171c7b8fcf1ca2aa452cddb3d14e0fc /theories/Init
parente3593abd322acb59c512b5f2f776091546b38887 (diff)
Rename Dec and HexDec to Decimal and Hexadecimal
As noted by Hugo Herbelin, Dec is rather used for "decidable".
Diffstat (limited to 'theories/Init')
-rw-r--r--theories/Init/Nat.v14
-rw-r--r--theories/Init/Number.v22
-rw-r--r--theories/Init/Numeral.v24
3 files changed, 36 insertions, 24 deletions
diff --git a/theories/Init/Nat.v b/theories/Init/Nat.v
index bc48311151..9a3a3ec99b 100644
--- a/theories/Init/Nat.v
+++ b/theories/Init/Nat.v
@@ -214,8 +214,8 @@ Definition of_hex_uint (d:Hexadecimal.uint) := of_hex_uint_acc d O.
Definition of_num_uint (d:Number.uint) :=
match d with
- | Number.UIntDec d => of_uint d
- | Number.UIntHex d => of_hex_uint d
+ | Number.UIntDecimal d => of_uint d
+ | Number.UIntHexadecimal d => of_hex_uint d
end.
Fixpoint to_little_uint n acc :=
@@ -236,9 +236,9 @@ Fixpoint to_little_hex_uint n acc :=
Definition to_hex_uint n :=
Hexadecimal.rev (to_little_hex_uint n Hexadecimal.zero).
-Definition to_num_uint n := Number.UIntDec (to_uint n).
+Definition to_num_uint n := Number.UIntDecimal (to_uint n).
-Definition to_num_hex_uint n := Number.UIntHex (to_hex_uint n).
+Definition to_num_hex_uint n := Number.UIntHexadecimal (to_hex_uint n).
Definition of_int (d:Decimal.int) : option nat :=
match Decimal.norm d with
@@ -254,15 +254,15 @@ Definition of_hex_int (d:Hexadecimal.int) : option nat :=
Definition of_num_int (d:Number.int) : option nat :=
match d with
- | Number.IntDec d => of_int d
- | Number.IntHex d => of_hex_int d
+ | Number.IntDecimal d => of_int d
+ | Number.IntHexadecimal d => of_hex_int d
end.
Definition to_int n := Decimal.Pos (to_uint n).
Definition to_hex_int n := Hexadecimal.Pos (to_hex_uint n).
-Definition to_num_int n := Number.IntDec (to_int n).
+Definition to_num_int n := Number.IntDecimal (to_int n).
(** ** Euclidean division *)
diff --git a/theories/Init/Number.v b/theories/Init/Number.v
index 228f84b179..eb9cc856ac 100644
--- a/theories/Init/Number.v
+++ b/theories/Init/Number.v
@@ -12,11 +12,23 @@
Require Import Decimal Hexadecimal.
-Variant uint := UIntDec (u:Decimal.uint) | UIntHex (u:Hexadecimal.uint).
-
-Variant int := IntDec (i:Decimal.int) | IntHex (i:Hexadecimal.int).
-
-Variant number := Dec (d:Decimal.decimal) | Hex (h:Hexadecimal.hexadecimal).
+Variant uint := UIntDecimal (u:Decimal.uint) | UIntHexadecimal (u:Hexadecimal.uint).
+#[deprecated(since="8.13",note="Use UintDecimal instead.")]
+Notation UIntDec := UIntDecimal (only parsing).
+#[deprecated(since="8.13",note="Use UintHexadecimal instead.")]
+Notation UIntHex := UIntHexadecimal (only parsing).
+
+Variant int := IntDecimal (i:Decimal.int) | IntHexadecimal (i:Hexadecimal.int).
+#[deprecated(since="8.13",note="Use IntDecimal instead.")]
+Notation IntDec := IntDecimal (only parsing).
+#[deprecated(since="8.13",note="Use IntHexadecimal instead.")]
+Notation IntHex := IntHexadecimal (only parsing).
+
+Variant number := Decimal (d:Decimal.decimal) | Hexadecimal (h:Hexadecimal.hexadecimal).
+#[deprecated(since="8.13",note="Use Decimal instead.")]
+Notation Dec := Decimal (only parsing).
+#[deprecated(since="8.13",note="Use Hexadecimal instead.")]
+Notation Hex := Hexadecimal (only parsing).
Scheme Equality for uint.
Scheme Equality for int.
diff --git a/theories/Init/Numeral.v b/theories/Init/Numeral.v
index c87f17ee5a..50fa312e7e 100644
--- a/theories/Init/Numeral.v
+++ b/theories/Init/Numeral.v
@@ -14,24 +14,24 @@ Require Import Decimal Hexadecimal Number.
#[deprecated(since="8.13",note="Use Number.uint instead.")]
Notation uint := uint (only parsing).
-#[deprecated(since="8.13",note="Use Number.UintDec instead.")]
-Notation UIntDec := UIntDec (only parsing).
-#[deprecated(since="8.13",note="Use Number.UintHex instead.")]
-Notation UIntHex := UIntHex (only parsing).
+#[deprecated(since="8.13",note="Use Number.UintDecimal instead.")]
+Notation UIntDec := UIntDecimal (only parsing).
+#[deprecated(since="8.13",note="Use Number.UintHexadecimal instead.")]
+Notation UIntHex := UIntHexadecimal (only parsing).
#[deprecated(since="8.13",note="Use Number.int instead.")]
Notation int := int (only parsing).
-#[deprecated(since="8.13",note="Use Number.IntDec instead.")]
-Notation IntDec := IntDec (only parsing).
-#[deprecated(since="8.13",note="Use Number.IntHex instead.")]
-Notation IntHex := IntHex (only parsing).
+#[deprecated(since="8.13",note="Use Number.IntDecimal instead.")]
+Notation IntDec := IntDecimal (only parsing).
+#[deprecated(since="8.13",note="Use Number.IntHexadecimal instead.")]
+Notation IntHex := IntHexadecimal (only parsing).
#[deprecated(since="8.13",note="Use Number.numeral instead.")]
Notation numeral := number (only parsing).
-#[deprecated(since="8.13",note="Use Number.Dec instead.")]
-Notation Dec := Dec (only parsing).
-#[deprecated(since="8.13",note="Use Number.Hex instead.")]
-Notation Hex := Hex (only parsing).
+#[deprecated(since="8.13",note="Use Number.Decimal instead.")]
+Notation Dec := Decimal (only parsing).
+#[deprecated(since="8.13",note="Use Number.Hexadecimal instead.")]
+Notation Hex := Hexadecimal (only parsing).
#[deprecated(since="8.13",note="Use Number.uint_beq instead.")]
Notation uint_beq := uint_beq (only parsing).