diff options
| author | Emilio Jesus Gallego Arias | 2017-10-02 12:22:32 +0200 |
|---|---|---|
| committer | Vincent Laporte | 2018-10-10 15:19:07 +0000 |
| commit | 8ac6145d5cc14823df48698a755d8adf048f026c (patch) | |
| tree | fa8bf650d111b828958ad7468fd0ec3b445d2305 /theories/Arith | |
| parent | ea38cc10b1b3d81e2346de6b95076733ef4fd7bb (diff) | |
[coqlib] Rebindable Coqlib namespace.
We refactor the `Coqlib` API to locate objects over a namespace
`module.object.property`.
This introduces the vernacular command `Register g as n` to expose the
Coq constant `g` under the name `n` (through the `register_ref`
function). The constant can then be dynamically located using the
`lib_ref` function.
Co-authored-by: Emilio Jesús Gallego Arias <e+git@x80.org>
Co-authored-by: Maxime Dénès <mail@maximedenes.fr>
Co-authored-by: Vincent Laporte <Vincent.Laporte@fondation-inria.fr>
Diffstat (limited to 'theories/Arith')
| -rw-r--r-- | theories/Arith/Compare_dec.v | 12 | ||||
| -rw-r--r-- | theories/Arith/Minus.v | 2 | ||||
| -rw-r--r-- | theories/Arith/Peano_dec.v | 2 |
3 files changed, 16 insertions, 0 deletions
diff --git a/theories/Arith/Compare_dec.v b/theories/Arith/Compare_dec.v index 6f220f2023..0c68b75124 100644 --- a/theories/Arith/Compare_dec.v +++ b/theories/Arith/Compare_dec.v @@ -83,6 +83,8 @@ Proof. apply le_dec. Defined. +Register le_gt_dec as num.nat.le_gt_dec. + (** Proofs of decidability *) Theorem dec_le n m : decidable (n <= m). @@ -130,6 +132,16 @@ Proof. apply Nat.nlt_ge. Qed. +Register dec_le as num.nat.dec_le. +Register dec_lt as num.nat.dec_lt. +Register dec_ge as num.nat.dec_ge. +Register dec_gt as num.nat.dec_gt. +Register not_eq as num.nat.not_eq. +Register not_le as num.nat.not_le. +Register not_lt as num.nat.not_lt. +Register not_ge as num.nat.not_ge. +Register not_gt as num.nat.not_gt. + (** A ternary comparison function in the spirit of [Z.compare]. See now [Nat.compare] and its properties. diff --git a/theories/Arith/Minus.v b/theories/Arith/Minus.v index 3bf6cd952f..d6adb7e205 100644 --- a/theories/Arith/Minus.v +++ b/theories/Arith/Minus.v @@ -46,6 +46,8 @@ Proof. symmetry. apply Nat.sub_1_r. Qed. +Register pred_of_minus as num.nat.pred_of_minus. + (** * Diagonal *) Notation minus_diag := Nat.sub_diag (only parsing). (* n - n = 0 *) diff --git a/theories/Arith/Peano_dec.v b/theories/Arith/Peano_dec.v index 9a24c804a1..ddbc128aa1 100644 --- a/theories/Arith/Peano_dec.v +++ b/theories/Arith/Peano_dec.v @@ -30,6 +30,8 @@ Proof. elim (Nat.eq_dec n m); [left|right]; trivial. Defined. +Register dec_eq_nat as num.nat.eq_dec. + Definition UIP_nat:= Eqdep_dec.UIP_dec Nat.eq_dec. Import EqNotations. |
