Home
About Coq
Get Coq
Documentation
Community
The Coq Proof Assistant
Library Coq.Numbers.DecimalZ
DecimalZ
Proofs that conversions between decimal numbers and
Z
are bijections.
Require
Import
Decimal
DecimalFacts
DecimalPos
DecimalN
ZArith
.
Lemma
of_to
(
z
:
Z
) :
Z.of_int
(
Z.to_int
z
)
=
z
.
Lemma
to_of
(
d
:
int
) :
Z.to_int
(
Z.of_int
d
)
=
norm
d
.
Some consequences
Lemma
to_int_inj
n
n'
:
Z.to_int
n
=
Z.to_int
n'
->
n
=
n'
.
Lemma
to_int_surj
d
:
exists
n
,
Z.to_int
n
=
norm
d
.
Lemma
of_int_norm
d
:
Z.of_int
(
norm
d
)
=
Z.of_int
d
.
Lemma
of_inj
d
d'
:
Z.of_int
d
=
Z.of_int
d'
->
norm
d
=
norm
d'
.
Lemma
of_iff
d
d'
:
Z.of_int
d
=
Z.of_int
d'
<->
norm
d
=
norm
d'
.
Navigation
Standard Library
Table of contents
Index