| 1 |
(************************************************************************) |
| 2 |
(* * The Rocq Prover / The Rocq Development Team *) |
| 3 |
(* v * Copyright INRIA, CNRS and contributors *) |
| 4 |
(* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 |
(* \VV/ **************************************************************) |
| 6 |
(* // * This file is distributed under the terms of the *) |
| 7 |
(* * GNU Lesser General Public License Version 2.1 *) |
| 8 |
(* * (see LICENSE file for the text of the license) *) |
| 9 |
(************************************************************************) |
| 10 |
|
| 11 |
(** * Decimal or Hexadecimal numbers *) |
| 12 |
|
| 13 |
Require Import Decimal Hexadecimal. |
| 14 |
|
| 15 |
Variant uint := UIntDecimal (u:Decimal.uint) | UIntHexadecimal (u:Hexadecimal.uint). |
| 16 |
|
| 17 |
Variant signed_int := IntDecimal (i:Decimal.int) | IntHexadecimal (i:Hexadecimal.int). |
| 18 |
Abbreviation int := signed_int. |
| 19 |
|
| 20 |
Variant number := Decimal (d:Decimal.decimal) | Hexadecimal (h:Hexadecimal.hexadecimal). |
| 21 |
|
| 22 |
Scheme Equality for uint. |
| 23 |
Scheme Equality for int. |
| 24 |
Scheme Equality for number. |
| 25 |
Abbreviation int_eq_dec := signed_int_eq_dec. |
| 26 |
Abbreviation int_beq := signed_int_beq. |
| 27 |
Abbreviation internal_int_dec_lb := internal_signed_int_dec_lb. |
| 28 |
Abbreviation internal_int_dec_bl := internal_signed_int_dec_bl. |
| 29 |
|
| 30 |
Register uint as num.num_uint.type. |
| 31 |
Register int as num.num_int.type. |
| 32 |
Register number as num.number.type. |
| 33 |
|
| 34 |
(** Pseudo-conversion functions used when declaring |
| 35 |
Number Notations on [uint] and [int]. *) |
| 36 |
|
| 37 |
Definition uint_of_uint (i:uint) := i. |
| 38 |
Definition int_of_int (i:int) := i. |